From 75fb823b8510bbc76c7872d62edd7bce50773928 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 23 Dec 2010 00:07:20 +0530 Subject: [PATCH] namespace --- pandora/user/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora/user/views.py b/pandora/user/views.py index 166e7335..2e27fbfd 100644 --- a/pandora/user/views.py +++ b/pandora/user/views.py @@ -26,7 +26,7 @@ class LoginForm(forms.Form): username = forms.TextInput() password = forms.TextInput() -def login(request): +def api_login(request): ''' param data {'username': username, 'password': password} @@ -55,7 +55,7 @@ def login(request): response = json_response(status=400, text='invalid data') return render_to_json_response(response) -actions.register(login) +actions.register(api_login, 'login') def logout(request): ''' @@ -68,7 +68,7 @@ def logout(request): if request.user.is_authenticated(): logout(request) return render_to_json_response(response) -actions.register(logout) +actions.register(api_logout, 'logout') class RegisterForm(forms.Form): username = forms.TextInput()