Skip to main content

A simple lib let you decorating Django view functions based on url patterns.

Project description

# django_url_decr

Django Url Decorator is a simple lib let you decorating Django
view functions based on url patterns, e.g., you may add
_login\_required_ decorator for all sub urls of _/users/*_ :

from django_url_decr import url_decr
from django.contrib.auth.decorators import login_required

urlpatterns = patterns(''
url_decr(r'^users/',
include('users.urls'),
decr=login_required))


Note that you can only decorate the same sub url patterns only once.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_url_decr-0.1.0.tar.gz (1.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page