django-urldecorators 0.4

Apply view decorators and middleware components
django-urldecorators is a reusable Django plugin which allows you to apply view decorators and middleware components depending on requested URL.

Installation and usage:

1) Run python setup.py install or add urldecorators directory on your PYTHONPATH

2) In urls.py file replace 'from django.conf.urls.defaults import *' by 'from urldecorators.defaults import *'
  
 3) Pass list of decorators or middleware_classes to as argument to url function

Example urls.py file:

  from urldecorators.defaults import *
 
  urlpatterns = patterns('',                      
      url(r'^private/$', include('example.private.urls'),
          decorators=['django.contrib.auth.decorators.login_required']),
      url(r'^articles/$', include('example.articles.urls'),
          middleware_classes=['django.middleware.cache.CacheMiddleware']),
  )

last updated on:
August 20th, 2012, 12:18 GMT
price:
FREE!
developed by:
Miloslav Pojman
homepage:
github.com
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT