Reputation: 1025
I have django app where i can upload my zipped online catalogue.
File structure is something similar to this:
-index.html
-book.swf
-css/
-js/
Now I want to store in my media directory in subdirectory named by it's ID.
Example path: /media/publication/12
Is there any way to open this directly without rounting? Now i get 403 error.
I could do something like this in some PHP frameworks. I created a subdirectory in my app main directory and I could just open in web browser: example.com/publication/12
and index.html
was shown in browser.
I want to do it like this because there is many relative urls in files in these catalogues an when I use routes, relative paths to assets are not working and there is too much css, js and flash files linked in index.html. Regexp replacing isn't working well too.
Upvotes: 0
Views: 89
Reputation: 599846
This is not a Django question; these are all static files and should not go through Django. You need to configure your web server to serve files under /media/
.
Upvotes: 1