PyLucid CMS Logo

About needed static media files in PyLucid

page message
  • Entry for this url doesn't exist.
  • Entry for this url doesn't exist.
  • Entry for this url doesn't exist.
  • Entry for this url doesn't exist.

PyLucid and the django admin panel needs some static media files (e.g. JavaScript, CSS).
You will get some JavaScript alert messages, if the browser can't load those static media files.

The static media files are here:

↑ virtualenv  #

If you use virtualenv you must symlink or copy the files together:

It's plant to use The staticfiles app, see: https://github.com/jedie/PyLucid/issues/55

/var/www/YourSite/media/PyLucid/ PyLucid_env/src/pylucid/pylucid_project/media/PyLucid/
/var/www/YourSite/media/django/ PyLucid_env/lib/python2.6/site-packages/django/contrib/admin/media/

↑ standalone package  #

In the standalone package are the media files in the right place. No copy needed.

↑ example settings  #

You must the right path to media files in your local_settings.py, e.g.:

(This would be automatically done if you used the 'create a new page instance' script)

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Absolute _local_filesystem_path_ to the directory that holds media.
MEDIA_ROOT = "/var/www/YourSite/media/"

# URL that handles the media served from MEDIA_ROOT.
#     Example-1: "/media/" (default)
#     Examlpe-2: "http://other_domain.net/media/"
#     Example-3: "http://media.your_domain.net/"
MEDIA_URL = "/media/"

# URL prefix for django admin media -- CSS, JavaScript and images. Saved in /django/contrib/admin/media/
ADMIN_MEDIA_PREFIX = "/media/django/"

Because of the browser 'same origin policy' it's not a good idea to put the static media on a other domain!

0 comments for 'about static files':
    there exist no comment for 'about static files'
Leave a comment

django-processinfo: 6.4 ms of 291.3 ms (2.2%)