I have a couple of projects that use the same application
(particularly, photologue). In one project, I want the views of the
imported application to require users be signed in. All the views in
this imported application are generic. So, is it possible to use
login_required w/o having to go into photologue.urls and add the
decorator? Is it possible to do this in my projects urls file? I am
new to Python so I'm not sure I'm on the right track but I thought I
should do something along the lines of writing my own wrapper that
would take photologue.urls as an argument (the **kwargs argument,
maybe?) Like:
@login_required
restrict_access(*args, **kwargs)
#if this is indeed the right idea, this is where I'm not quite
sure what to do...
if kwargs.list_object(*args, **kwargs)
return kwargs.list_object
I know this isn't right but I am not 100% sure of the concept of
decorators.
thanks for any help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---