Author: leidel
Date: Sat Mar 21 04:09:29 2009
New Revision: 1148
Added:
wiki/MediaHandling.wiki
Log:
Created wiki page through web user interface.
Added: wiki/MediaHandling.wiki
==============================================================================
--- (empty file)
+++ wiki/MediaHandling.wiki Sat Mar 21 04:09:29 2009
@@ -0,0 +1,53 @@
+#summary Explains how Pinax is handling media files from external apps and
themes
+
+==Overriding media defaults==
+
+If you want to override default media files, place yours under
+`<project_name>/media/...` with the same path. For example:
+
+original file:
+{{{
+src/pinax/media/default/pianx/images/logo.png
+}}}
+your file:
+{{{
+<project_name>/media/pinax/images/logo.png
+}}}
+
+==Locations of media files==
+
+If you want to use Pinax' media handling with your own Django apps, please
make sure you put the media files (like JavaScript, stylesheets and images)
in the following directory structure:
+
+{{{
+<app_name>/media/<app_name>/(js|img|css)
+}}}
+
+That "namespacing" is required to prevent name collision of media files
while deploying.
+
+Site specific media files goes to:
+{{{
+<project_name>/media/siteExample.js
+}}}
+
+The special static file service view should be able to serve the media
files in development.
+
+==build_media managment command==
+
+The build_media script should be able to collect the media files from Pinax
+and all the apps and arrange them under the `<project_name>/site_media`
folder.
+
+The command:
+
+{{{
+<project_name>/python manage.py build_media
+}}}
+will collect the media files from Pinax and all the apps and places them in
+the `site_media` folder.
+
+If you have two apps with the same file and the same relative path it's
advised to use the --interactive option so the script will prompt you to
choose which one to use. This is useful in case you want to overwrite
default media files with your custom app for example. Remember to remove
the site_media folder before you use this option or the script will prompt
you for each file.
+
+Please also refer to the help of the build_media management command by
running
+
+{{{
+<project_name>/python manage.py build_media --help
+}}}
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---