From 849ebd28a2388e3257cb360a4609d3e9dfc77dc0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Aug 2015 14:06:07 -0400 Subject: ok --- backend/views.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'backend/views.py') diff --git a/backend/views.py b/backend/views.py index 5e24078..1d7d431 100755 --- a/backend/views.py +++ b/backend/views.py @@ -384,8 +384,8 @@ def api_auth_login(request): user = auth.authenticate(username=request.POST['username'], password=request.POST['password']) #any idea? well for login to work i think ajax should send cookies, but i don't see any django cookies there - if not user: - return response_error('NO USER') +# if not user: +# return response_error('NO USER') if user: if user.is_active: auth.login(request, user) @@ -399,7 +399,10 @@ def api_auth_login(request): return response_error('WRONG PASSWORD') else: return response_error('NO SUCH USER') - +# ok just wrong password +# other weird thing is that when I enter it, the form submission goes nuts and keeps submitting, do you have that issue? yep +#what could that be, js thing? looks so it's as though it's not doing the right password formula, like when I reset the password with +# the reset link, it's doing a different type of hashing or something? could be, let's check database again @require_POST def api_auth_logout(request): """ Log out user. Public API @@ -438,6 +441,7 @@ def api_auth_register(request): """ Register new user. Public API """ form_fields = ['username', 'password'] +#was there any preprocessing for password on js side? maybe so do you see any here? response = check_form_fields(request, form_fields) if response: return response @@ -1071,6 +1075,7 @@ def api_video_search(request): if response: return response + response = response_success() #like this? hope so videos = SearchQuerySet().filter(content=request.POST['q']).load_all() for searchresult in videos.all(): v = searchresult.object -- cgit v1.2.3-70-g09d2