This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Handling django app media

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

<application1>/media/<application1>/js/script.js
<application2>/media/<application2>/js/script.js

<project>/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<path>.*)$', '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/<application_name>/'.

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

Release History

This version
History Node

1.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-appmedia-1.0.1.tar.gz (25.3 kB) Copy SHA256 Checksum SHA256 Source Apr 11, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting