redirect to supporter page if logged in
parent
b709cf3d61
commit
195f6db360
|
@ -1,9 +1,16 @@
|
|||
from django.template import RequestContext
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
|
||||
from regluit.core import models
|
||||
|
||||
def home(request):
|
||||
# if the user is logged in send them to their supporter page
|
||||
if request.user.is_authenticated():
|
||||
return HttpResponseRedirect(reverse('supporter',
|
||||
args=[request.user.username]))
|
||||
return render_to_response('home.html',
|
||||
{},
|
||||
context_instance=RequestContext(request)
|
||||
|
|
Loading…
Reference in New Issue