update
This commit is contained in:
+10
-2
@@ -1,17 +1,25 @@
|
||||
from django.urls import path
|
||||
|
||||
from server.views import *
|
||||
from server.views.mind_map import *
|
||||
from server.views.user import *
|
||||
from server.view_test import *
|
||||
|
||||
urlpatterns = [
|
||||
# ---------------------------------------------------
|
||||
path('test', test), #
|
||||
|
||||
# ---------------------------------------------------
|
||||
path('', to_list), # 跳转列表界面
|
||||
path('detail', to_detail), # 跳转详情界面
|
||||
path('dashboard', to_dashboard), #
|
||||
|
||||
# ---------------------------------------------------
|
||||
path('create', JsMindView.as_view()), # 创建思维导图
|
||||
path('delete', JsMindView.as_view()), # 删除思维导图
|
||||
path('list', JsMindView.as_view()), # 查询思维导图
|
||||
path(r'jsmind_op', JsMindLogView.as_view()), # 更新快照,get日志
|
||||
|
||||
path('test', test), #
|
||||
# ---------------------------------------------------
|
||||
path('register', MindUserView.as_view()), # 用户注册
|
||||
|
||||
]
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
from rest_framework.views import APIView
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
class MindUserView(APIView):
|
||||
"""
|
||||
用户注册
|
||||
"""
|
||||
|
||||
def post(self, request):
|
||||
data_dict = request.POST
|
||||
user_name = data_dict.get('userName')
|
||||
input_password = data_dict.get('inputPassword')
|
||||
print('userName:%s,inputPassword:%s' % (user_name, input_password))
|
||||
return HttpResponse("success")
|
||||
Reference in New Issue
Block a user