Skip to content

Configure the javascript export path

msama edited this page Aug 3, 2012 · 3 revisions

By default all the generated javascript files are created in settings.MEDIA_ROOT and not in settings.STATIC_ROOT because only the collectstatic should write in the static root folder.

To place all the generated files in the static root, as it is commended developers should do as follows:

# Jom folder
JOM_ROOT = os.path.join(os.path.dirname(__file__), "jom/").replace("\\","/")

# Additional locations of static files
STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    JOM_ROOT,
)

Note

Instead of importing all the JomEntry files it would be better to compress and import a single one.

Clone this wiki locally