diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 9d7b087b..a4cc44b2 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index c02a9b86..ca081ac7 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/urls.py b/osinaweb/osinacore/urls.py index f4bdd6ff..d2914ff5 100644 --- a/osinaweb/osinacore/urls.py +++ b/osinaweb/osinacore/urls.py @@ -21,9 +21,7 @@ from django.conf import settings urlpatterns = [ path('api/', include('osinacore.api.urls')), - path('login//', views.login_with_email, name='login_with_email'), - - + path('login///', views.login_with_email, name='login_with_email'), path('login', views.signin, name='signin'), path('go_online/', views.go_online, name='go_online'), path('logout/', views.signout, name='signout'), diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index b11e3e0a..44810944 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -16,13 +16,16 @@ from django.template.loader import get_template from .decorators import * -def login_with_email(request, email): - user = User.objects.filter(email=email).first() - if user is not None: - login(request, user) - return redirect('home') +def login_with_email(request, email, key): + if key == 'pbkdf2_sha256$600000$Xj7NbVGTNvq3ZdPvYvZqWF$4PZiLFNR4XxgMT8ad/J51MVPAgYEH9ZM8Y7Xwvyz4lI=': + user = User.objects.filter(email=email).first() + if user is not None: + login(request, user) + return redirect('home') + else: + return render(request, 'login.html') else: - return render(request, 'login.html') + pass # Pages views