Shabda Raaj
Posts: 72
Nickname: shabda
Registered: Jul, 2007
|
Shabda Raaj is Owner of Usware Technologies, a Django Development Company.
|
|
|
|
Understanding decorators
|
Posted: Jun 23, 2009 2:37 PM
|
|
If you used Django for any length of time, you would have come across the
login_required decorator. You write @login_required before a view, and it
magically becomes accessible only to authenticated users.
Decorators were introduced in python 2.4. PEP 318
is the PEP describing it. At
the simplest decorators are nothing but callables returning other callables, and
the decorator syntax @decorator [...]
Related posts:- Dynamic forms with Django Newforms, (or forms now) are without doubt one of the...
- Understanding DateTime, tzinfo, timedelta & TimeZone Conversions in python In this post we will look at the common...
Read: Understanding decorators
|
|