mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Set up authentication system
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
from django.shortcuts import render
|
||||
from django.http.response import HttpResponseRedirect
|
||||
|
||||
# Create your views here.
|
||||
def login(request, **kwargs):
|
||||
if request.user.is_authenticated():
|
||||
next = request.REQUEST.get('next', '/')
|
||||
return HttpResponseRedirect(request.REQUEST.get('next', '/'))
|
||||
else:
|
||||
from django.contrib.auth.views import login
|
||||
return login(request)
|
||||
Reference in New Issue
Block a user