I have a scenario that is probably pretty common. I have a set of static files that I would like to restrict access to. The only real restriction is that people who are not logged in to my application should not be able to download these files. I'm using a python 2.6, django 1.2 and apache 2.2.
To achieve this, I'm starting to look at the info here: http://code.google.com/p/modwsgi/wiki/FileWrapperExtension I have also started to read up on the posts about wsgi.file_wrapper talked about here: http://blog.dscpl.com.au/search/label/mod_wsgi My questions come down to this: Am I on the right track? My content is logically grouped like this: /media/<section1> /media/<section2> /media/section3> If i were to want to restrict access to one (or more) of the sub-sections, I am thinking that I could create a mapping in my urls.py that corresponds to the correct section and let my wsgi.file_wrapper handle it. Is this a correct assumption? It would be convenient if the file wrapper were a part of my application since it's essentially looking for a valid http session to see if a user is 'logged in' or not. Any special caveats I need to be mindful of? Thanks for any tips/pointers. I'm quite new to python/wsgi so if these questions are in a faq I have not yet read a url would be both appreciated and sufficient. -- J. -- You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en.
