Themes¶
Several pre-build themes available withing the django-material package. To enable a theme just put the desired theme application into the INSTALLED_APPS setting before the material app.
Theme applications contains CSS and images for the material frontend.
INSTALLED_APPS = [
'material.theme.amber',
'material',
...
]
After theme change, press Ctrl-F5 to reload the page and refresh browser cache.
For the production deployment, consider to set:
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
See also
django.contrib.staticfiles.storage.CachedStaticFilesStorage
List of build-in themes¶
red pink purple deeppurple indigo blue lightblue cyan teal green lightgreen lime yellow amber orange deeporange brown bluegreyCustom theme generator¶
PRO Only
To create a custom theme you can use ./manage.py createtheme command.
To run it, yarn tool need to be installed. See https://yarnpkg.com/en/docs/install for details.
Example:
$ python manage.py createtheme --primary-color=1b5e20 --secondary-color=01579b
By default the generated files would be placed in the first directory from STATICFILES_DIRS setting. You can specify custom output location with –dest option.