summaryrefslogtreecommitdiff
path: root/backend/views.py
diff options
context:
space:
mode:
authorroot <root@dino.fm>2015-08-06 14:06:07 -0400
committerroot <root@dino.fm>2015-08-06 14:06:07 -0400
commit849ebd28a2388e3257cb360a4609d3e9dfc77dc0 (patch)
tree3bbf18032f25e25d371ac1c96e79b1f8f4a9b5c0 /backend/views.py
parenteb77110c49b06606533add8a4a16e04565926fab (diff)
ok
Diffstat (limited to 'backend/views.py')
-rwxr-xr-xbackend/views.py11
1 files changed, 8 insertions, 3 deletions
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