Guest User

Untitled

a guest
May 20th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. from django.shortcuts import render
  2.  
  3.  
  4. def index(request):
  5. context = {
  6. 'message': 'You can see this messabe because you are authenticated!!!'
  7. if request.user.is_authenticated
  8. else 'You can not see this message because you are not authenticated'
  9. }
  10.  
  11. return render(request, 'blog/index.html', context)
Add Comment
Please, Sign In to add comment