diff options
author | adam <adam> | 2011-02-17 18:07:29 +0000 |
---|---|---|
committer | adam <adam> | 2011-02-17 18:07:29 +0000 |
commit | 159e609feb8d36162fa22d9db67d14f57903fa64 (patch) | |
tree | 66780e3840a965f2ae8f32365c06645b35af1a2d /www | |
parent | 1a8d1ce6ca14da1edb5355c5e2a7c7bc2bc6c4de (diff) | |
download | pkgsrc-159e609feb8d36162fa22d9db67d14f57903fa64.tar.gz |
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/'
Diffstat (limited to 'www')
-rw-r--r-- | www/py-django-appmedia/DESCR | 20 | ||||
-rw-r--r-- | www/py-django-appmedia/Makefile | 22 | ||||
-rw-r--r-- | www/py-django-appmedia/PLIST | 39 | ||||
-rw-r--r-- | www/py-django-appmedia/distinfo | 5 |
4 files changed, 86 insertions, 0 deletions
diff --git a/www/py-django-appmedia/DESCR b/www/py-django-appmedia/DESCR new file mode 100644 index 00000000000..6a8f2e3753f --- /dev/null +++ b/www/py-django-appmedia/DESCR @@ -0,0 +1,20 @@ +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/' diff --git a/www/py-django-appmedia/Makefile b/www/py-django-appmedia/Makefile new file mode 100644 index 00000000000..013247647eb --- /dev/null +++ b/www/py-django-appmedia/Makefile @@ -0,0 +1,22 @@ +# $NetBSD: Makefile,v 1.1.1.1 2011/02/17 18:07:29 adam Exp $ + +DISTNAME= django-appmedia-1.0.1 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= www python +MASTER_SITES= http://pypi.python.org/packages/source/d/django-appmedia/ + +MAINTAINER= adam@NetBSD.org +HOMEPAGE= https://github.com/divio/django-appmedia +COMMENT= Handling django app media +LICENSE= modified-bsd + +PKG_DESTDIR_SUPPORT= user-destdir + +#WRKSRC= ${WRKDIR}/south +EGG_NAME= ${DISTNAME:S/-/_/} +USE_LANGUAGES= # empty + +DEPENDS+= ${PYPKGPREFIX}-django-[0-9]*:../../www/py-django + +.include "../../lang/python/egg.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/www/py-django-appmedia/PLIST b/www/py-django-appmedia/PLIST new file mode 100644 index 00000000000..cd27709eb60 --- /dev/null +++ b/www/py-django-appmedia/PLIST @@ -0,0 +1,39 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2011/02/17 18:07:29 adam Exp $ +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/not-zip-safe +${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/appmedia/BeautifulSoup.py +${PYSITELIB}/appmedia/BeautifulSoup.pyc +${PYSITELIB}/appmedia/BeautifulSoup.pyo +${PYSITELIB}/appmedia/__init__.py +${PYSITELIB}/appmedia/__init__.pyc +${PYSITELIB}/appmedia/__init__.pyo +${PYSITELIB}/appmedia/api.py +${PYSITELIB}/appmedia/api.pyc +${PYSITELIB}/appmedia/api.pyo +${PYSITELIB}/appmedia/management/__init__.py +${PYSITELIB}/appmedia/management/__init__.pyc +${PYSITELIB}/appmedia/management/__init__.pyo +${PYSITELIB}/appmedia/management/commands/__init__.py +${PYSITELIB}/appmedia/management/commands/__init__.pyc +${PYSITELIB}/appmedia/management/commands/__init__.pyo +${PYSITELIB}/appmedia/management/commands/buildmedia.py +${PYSITELIB}/appmedia/management/commands/buildmedia.pyc +${PYSITELIB}/appmedia/management/commands/buildmedia.pyo +${PYSITELIB}/appmedia/management/commands/symlinkmedia.py +${PYSITELIB}/appmedia/management/commands/symlinkmedia.pyc +${PYSITELIB}/appmedia/management/commands/symlinkmedia.pyo +${PYSITELIB}/appmedia/middleware.py +${PYSITELIB}/appmedia/middleware.pyc +${PYSITELIB}/appmedia/middleware.pyo +${PYSITELIB}/appmedia/models.py +${PYSITELIB}/appmedia/models.pyc +${PYSITELIB}/appmedia/models.pyo +${PYSITELIB}/appmedia/urls.py +${PYSITELIB}/appmedia/urls.pyc +${PYSITELIB}/appmedia/urls.pyo +${PYSITELIB}/appmedia/views.py +${PYSITELIB}/appmedia/views.pyc +${PYSITELIB}/appmedia/views.pyo diff --git a/www/py-django-appmedia/distinfo b/www/py-django-appmedia/distinfo new file mode 100644 index 00000000000..068331799e8 --- /dev/null +++ b/www/py-django-appmedia/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2011/02/17 18:07:29 adam Exp $ + +SHA1 (django-appmedia-1.0.1.tar.gz) = 1f7d9ca0cbae23872cdfac09e488c89c4c3766d8 +RMD160 (django-appmedia-1.0.1.tar.gz) = 462fec7ecedb7f77b3b7c8cf065cbb08827b8c5e +Size (django-appmedia-1.0.1.tar.gz) = 25263 bytes |