Reason #2 on why Django is great

March 23, 2010    Django

The decorators that Django has are a great time saver. There are a lot of methods in your views where you only want logged in users to see. So you can use a decorator before the function to check if they are logged in or not.

from django.contrib.auth.decorators import login_required

@login_required
def my_view(request):
    ....

So learn to use these time savers in your project.



comments powered by Disqus