Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

symlinks or builds appmedia for django projects

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 appmedia
Octocat-spinner-32 debian
Octocat-spinner-32 .gitignore
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
README.md

the intention of this application is to enable static app files (css, js, pics) in the app folder itself.

/media//js/script.js /media//js/script.js

/media/logo.jpg

To use this view in development you should add something like the following to urls.py: if settings.DEBUG: urlpatterns += (r'^media/(?P.*)$', 'site.media.serve_apps', {'document_root' : settings.MEDIA_ROOT})

For deployment there is a managament command called symlinkmedia that will create symlinks to each applications media directory in MEDIA_ROOT.

Now all apps in INSTALLED_APPS that have a "media" directory in them will be reachable as '/media//'.

You can then have the admin media files served by setting ADMIN_MEDIA_PREFIX = '/media/admin/'

Something went wrong with that request. Please try again.