> Just an idea: decorators for strings could also be implemented.
>
> url(r'regex', 'project.app.views.myview', decorator=login_required)
>
> Pistahh
-1

What happens when you need multiple stacked decorators? Decorators
which require arguments (auth_required) which might be complex would
mean moving code to urls.py which really should not be there. I also
would perfer to have only one version of a call, not one normal, and
one decorated in urls.py. Makes the code very hard to understand. It
is better to be explicit at the point of the call:

def myview(...):
    pass

@login_required
@cached
def cached_login_myview(...):
    myview(...)

if you need two versions of myview (decorated and undecorated). If you
only ever expect myview to be used in a case where a login is
required, then having login_required on the urls.py seems very very
wrong.

    -Doug


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to