12 lines
275 B
Python
12 lines
275 B
Python
from django.contrib.auth import logout
|
|
from django.shortcuts import render, redirect
|
|
|
|
|
|
def profile(request):
|
|
return render(request, "profile.html", {"username": request.user.username})
|
|
|
|
|
|
def logout_view(request):
|
|
logout(request)
|
|
|
|
return redirect('/user/profile')
|