mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
11 lines
396 B
Python
11 lines
396 B
Python
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) |