@@ -13,6 +13,7 @@ from miniapp import views as mini_views |
||
| 13 | 13 |
from operation import views as op_views |
| 14 | 14 |
from pay import views as pay_views |
| 15 | 15 |
from photo import views as photo_views |
| 16 |
+from server import server_views |
|
| 16 | 17 |
from wechat import views as wechat_views |
| 17 | 18 |
|
| 18 | 19 |
|
@@ -183,6 +184,11 @@ urlpatterns += [ |
||
| 183 | 184 |
url(r'^pai2/tginfo$', tourguidegroup_views.pai2_tginfo_api, name='pai2_tginfo_api'), # 首页旅行团信息 |
| 184 | 185 |
] |
| 185 | 186 |
|
| 187 |
+# 服务器相关 |
|
| 188 |
+urlpatterns += [ |
|
| 189 |
+ url(r'^s/server_time$', server_views.get_server_time_api, name='get_server_time_api'), # 获取服务器时间 |
|
| 190 |
+] |
|
| 191 |
+ |
|
| 186 | 192 |
# Mini App |
| 187 | 193 |
urlpatterns += [ |
| 188 | 194 |
url(r'^mini/userinfo$', mini_views.get_userinfo_api, name='get_userinfo_api'), # 获取用户信息 |
@@ -5,7 +5,6 @@ from __future__ import division |
||
| 5 | 5 |
from curtail_uuid import CurtailUUID |
| 6 | 6 |
from django.contrib.auth.hashers import check_password |
| 7 | 7 |
from django.db import transaction |
| 8 |
-from filemd5 import calculate_md5 |
|
| 9 | 8 |
from isoweek import Week |
| 10 | 9 |
from logit import logit |
| 11 | 10 |
from paginator import pagination |
@@ -54,6 +54,7 @@ INSTALLED_APPS = ( |
||
| 54 | 54 |
'page', |
| 55 | 55 |
'pay', |
| 56 | 56 |
'photo', |
| 57 |
+ 'server', |
|
| 57 | 58 |
'website', |
| 58 | 59 |
) |
| 59 | 60 |
|
@@ -5,7 +5,7 @@ Django==1.8.4 |
||
| 5 | 5 |
MySQL-python==1.2.5 |
| 6 | 6 |
Pillow==3.4.2 |
| 7 | 7 |
StatusCode==1.0.0 |
| 8 |
-TimeConvert==1.3.12 |
|
| 8 |
+TimeConvert==1.4.0 |
|
| 9 | 9 |
cryptography==1.5.2 |
| 10 | 10 |
django-curtail-uuid==1.0.0 |
| 11 | 11 |
django-detect==1.0.5 |
@@ -19,23 +19,23 @@ django-rlog==1.0.7 |
||
| 19 | 19 |
django-shortuuidfield==0.1.3 |
| 20 | 20 |
django-six==1.0.2 |
| 21 | 21 |
djangorestframework==3.5.3 |
| 22 |
-furl==0.5.6 |
|
| 22 |
+furl==0.5.7 |
|
| 23 | 23 |
hiredis==0.2.0 |
| 24 | 24 |
ipdb==0.10.1 |
| 25 | 25 |
ipython==5.1.0 |
| 26 |
-isoweek==1.3.1 |
|
| 27 |
-jsonfield==1.0.3 |
|
| 26 |
+isoweek==1.3.3 |
|
| 27 |
+jsonfield==2.0.1 |
|
| 28 | 28 |
mock==2.0.0 |
| 29 | 29 |
pep8==1.7.0 |
| 30 | 30 |
pysnippets==1.0.4 |
| 31 | 31 |
pywe-miniapp==1.0.0 |
| 32 |
-pywe-oauth==1.0.2 |
|
| 33 |
-pywe-response==1.0.0 |
|
| 32 |
+pywe-oauth==1.0.3 |
|
| 33 |
+pywe-response==1.0.1 |
|
| 34 | 34 |
records==0.4.3 |
| 35 |
-redis-extensions==1.0.45 |
|
| 35 |
+redis-extensions==1.0.49 |
|
| 36 | 36 |
requests==2.12.4 |
| 37 | 37 |
rlog==0.2 |
| 38 |
-shortuuid==0.4.3 |
|
| 38 |
+shortuuid==0.5.0 |
|
| 39 | 39 |
uWSGI==2.0.14 |
| 40 | 40 |
versions==0.10.0 |
| 41 | 41 |
wechatpy==1.2.8 |
@@ -0,0 +1,4 @@ |
||
| 1 |
+from django.contrib import admin |
|
| 2 |
+ |
|
| 3 |
+ |
|
| 4 |
+# Register your models here. |
@@ -0,0 +1,4 @@ |
||
| 1 |
+from django.db import models |
|
| 2 |
+ |
|
| 3 |
+ |
|
| 4 |
+# Create your models here. |
@@ -0,0 +1,13 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+ |
|
| 3 |
+from logit import logit |
|
| 4 |
+from TimeConvert import TimeConvert as tc |
|
| 5 |
+ |
|
| 6 |
+from utils.error.response_utils import response |
|
| 7 |
+ |
|
| 8 |
+ |
|
| 9 |
+@logit |
|
| 10 |
+def get_server_time_api(request): |
|
| 11 |
+ return response(200, 'Get Server Time Success', u'获取服务器时间成功', {
|
|
| 12 |
+ 'time': tc.local_string(), |
|
| 13 |
+ }) |
@@ -0,0 +1,4 @@ |
||
| 1 |
+from django.test import TestCase |
|
| 2 |
+ |
|
| 3 |
+ |
|
| 4 |
+# Create your tests here. |
@@ -0,0 +1,4 @@ |
||
| 1 |
+from django.shortcuts import render |
|
| 2 |
+ |
|
| 3 |
+ |
|
| 4 |
+# Create your views here. |