Currently I am having to choose between two ways to decorate 3rd party apps 
views:

1) Use a middleware 
(http://stackoverflow.com/questions/2164069/best-way-to-make-djangos-login-required-the-default)
 

2) Use some url 'magic' to apply the decorator 
(http://stackoverflow.com/questions/2307926/is-it-possible-to-decorate-include-in-django-urls-with-login-required)

What I would like to do is this:

url(r'^authurls', login_required(include('someapp.urls'), 
login_url='path/to/login'))


So 2 questions:

1)  What does everyone else do to accomplish this?

2) What should 3rd party apps (or Django) do to allow you to decorate their 
views, if they should at all? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/iNTpy2RpTJAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to