16 lines
307 B
Python
16 lines
307 B
Python
|
#!/usr/bin/env python3
|
||
|
"""
|
||
|
/logout app views.
|
||
|
"""
|
||
|
from django.contrib import messages
|
||
|
from django.shortcuts import redirect
|
||
|
from django.contrib.auth import logout
|
||
|
|
||
|
def index(request):
|
||
|
"""
|
||
|
Logs the user out.
|
||
|
"""
|
||
|
logout(request)
|
||
|
messages.success(request, "Logged out")
|
||
|
return redirect('homepage:index')
|