Rather than directly invoke command-line Python (and Mako) from the assets Rakefile, or call an external Python script, use a Django management command to preprocess all asset template files. An "asset template file" is defined as a static asset file with a file extension indicating that it needs to be run through a template engine prior to Sass/CoffeeScript compilation or packaging with other assets. The preprocess_assets management command will look through all of the files listed in the `STATICFILES_DIRS`, preprocessing each as needed. Preprocessing strips off the special template file extension, creating a new file in the process. Currently, the only variable accessible in an asset template file is the `THEME_NAME`, defined in the settings.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
cache_toolbox | Loading commit data... | |
contentserver | Loading commit data... | |
course_groups | Loading commit data... | |
django_comment_common | Loading commit data... | |
django_future | Loading commit data... | |
external_auth | Loading commit data... | |
heartbeat | Loading commit data... | |
mitxmako | Loading commit data... | |
monitoring | Loading commit data... | |
pipeline_mako | Loading commit data... | |
request_cache | Loading commit data... | |
service_status | Loading commit data... | |
static_replace | Loading commit data... | |
status | Loading commit data... | |
student | Loading commit data... | |
terrain | Loading commit data... | |
track | Loading commit data... | |
util | Loading commit data... | |
xmodule_modifiers.py | Loading commit data... |