kers/users/views.py

13 lines
275 B
Python
Raw Normal View History

2020-07-22 05:03:01 +02:00
from django.contrib.auth import logout
from django.shortcuts import render, redirect
2020-07-22 04:21:29 +02:00
def profile(request):
2020-07-22 04:28:01 +02:00
return render(request, "profile.html", {"username": request.user.username})
2020-07-22 05:03:01 +02:00
def logout_view(request):
logout(request)
return redirect('/user/profile')