Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created February 18, 2010 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdegges/307959 to your computer and use it in GitHub Desktop.
Save rdegges/307959 to your computer and use it in GitHub Desktop.
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
@login_required
def portal_main_page(request):
"""
If users are authenticated, direct them to the main page. Otherwise,
take them to the login page.
"""
return render_to_response('portal/index.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment