Path to this page:
./
www/py-django-appmedia,
Handling django app media
Branch: pkgsrc-2019Q3,
Version: 1.0.1,
Package name: py27-django-appmedia-1.0.1,
Maintainer: adamThe 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/'
Required to run:[
devel/py-setuptools] [
lang/python27]
Required to build:[
pkgtools/cwrappers]
Master sites:
SHA1: 1f7d9ca0cbae23872cdfac09e488c89c4c3766d8
RMD160: 462fec7ecedb7f77b3b7c8cf065cbb08827b8c5e
Filesize: 24.671 KB
Version history: (Expand)
- (2019-10-02) Package added to pkgsrc.se, version py27-django-appmedia-1.0.1 (created)