forked from 0x2620/pandora
namespace
This commit is contained in:
parent
07dcc77950
commit
75fb823b85
1 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ class LoginForm(forms.Form):
|
||||||
username = forms.TextInput()
|
username = forms.TextInput()
|
||||||
password = forms.TextInput()
|
password = forms.TextInput()
|
||||||
|
|
||||||
def login(request):
|
def api_login(request):
|
||||||
'''
|
'''
|
||||||
param data
|
param data
|
||||||
{'username': username, 'password': password}
|
{'username': username, 'password': password}
|
||||||
|
@ -55,7 +55,7 @@ def login(request):
|
||||||
response = json_response(status=400, text='invalid data')
|
response = json_response(status=400, text='invalid data')
|
||||||
|
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(login)
|
actions.register(api_login, 'login')
|
||||||
|
|
||||||
def logout(request):
|
def logout(request):
|
||||||
'''
|
'''
|
||||||
|
@ -68,7 +68,7 @@ def logout(request):
|
||||||
if request.user.is_authenticated():
|
if request.user.is_authenticated():
|
||||||
logout(request)
|
logout(request)
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
actions.register(logout)
|
actions.register(api_logout, 'logout')
|
||||||
|
|
||||||
class RegisterForm(forms.Form):
|
class RegisterForm(forms.Form):
|
||||||
username = forms.TextInput()
|
username = forms.TextInput()
|
||||||
|
|
Loading…
Reference in a new issue