add logout, primarily\ for dev purposes

pull/1/head
parent 5b98daba9a
commit 4125256601

@ -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']
return redirect('index')
Loading…
Cancel
Save