Created
December 27, 2020 17:20
-
-
Save doismellburning/63fd15f0eb9ab3180044a4451b877fcd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick example Django view to send authenticated users to a "home" page and show a landing page to others | |
def index(request): | |
if request.user.is_authenticated: | |
return redirect(reverse("home")) | |
return render(request, "oldschool/landing.html") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment