"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > 1) Create two separate media directories: /media/public and > /media/restricted > 2) Configure Apache to serve /media/public directory directly > 3) Configure Apache to serve the /media/restricted directory using > mod_python > 4) Set a url entry in urls.py to e.g.: > > (r'^media/restricted/(?P<path>.*)','myproject.myapp.views.view_restricted_media') > 5) Create view_restricted_media as: > @restrict_to_superuser > def view_restricted_media(request,path): > return static.serve(request,path,RESTRICTED_MEDIA_DIR)
Thanks; I'll probably end up doing something very much like this. The only thing I'm not crazy about with this solution is that it is a little intensive on the webserver configuration; I prefer to make the webserver configuration as simple as possible and do more complex things on the application side. In this case, it's not too bad; I'll just have to document it adequately. Thanks again. -- +-----------------------------------------------------------+ | Jason F. McBrayer [EMAIL PROTECTED] | | A flower falls, even though we love it; and a weed grows, | | even though we do not love it. -- Dogen | --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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-users -~----------~----~----~----~------~----~------~--~---