Skip to content

Instantly share code, notes, and snippets.

View tauzen's full-sized avatar

Krzysztof Mioduszewski tauzen

View GitHub Profile
@tauzen
tauzen / urls.py
Created February 1, 2014 13:49
Example of using login_required and staff_member_required decorators with Class-based views in Django.
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib import admin
from application.views import ApplicationFormView, ApplicationListView
admin.autodiscover()
urlpatterns = patterns('',