Posted By

Mravara on 01/16/14


Tagged


Versions (?)

How to Tango with Django


 / Published in: Python
 

URL: django_help

some description

  1. @login_required
  2. def about(request):
  3. category_list = get_category_list()
  4. template = 'rango/about.html'
  5. if request.session.get('visits'):
  6. count = request.session.get('visits')
  7. else:
  8. count = 0
  9. return render(request, template, {'visits': count, 'cat_list': category_list})

Report this snippet  

You need to login to post a comment.