@ -5,4 +5,5 @@ from . import views
urlpatterns = [
path('', views.index, name='index'),
path('login/<slug:token>', views.login, name='token_login'),
path('logout', views.logout, name='token_logout'),
]
@ -19,4 +19,8 @@ def login(request, token):
tk.helper.number_validated=True
tk.helper.save()
request.session['token'] = token
return redirect('index')
def logout(request):
del request.session['token']