An extension that allows re-usable apps to provide sets of templates and staticfiles for different boilerplates.
Project description
Allows re-usable apps to provide separate sets of templates and static files for different boilerplates. On Aldryn a boilerplate is seen as an opinionated structure of html and css. It encourages a certain way to organise blocks in django templates and can have naming conventions. It usually defines a css/js framework and comes with styling. Sort of like a “theme”.
Regular files in templates and static will be discovered as usual. Additonally you can add or override templates in templates_for_boilerplates/my-boilerplate-name/ and static_for_boilerplates/my-boilerplate-name/ that are specific to support a certain boilerplate.
So if you want to provide a set of templates with your app that works with the Standard Aldryn Boilerplate (aldryn-boilerplate-standard), just place them in templates_for_boilerplatess/standard/ and static_for_boilerplatess/standard/.
Installation
pip install aldryn-boilerplates
Configuration
INSTALLED_APPS = [ ... 'aldryn_boilerplates', ... ] CONTEXT_PROCESSORS = [ ... 'aldryn_boilerplates.context_processors.boilerplate', ] STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', # important! place right before django.contrib.staticfiles.finders.AppDirectoriesFinder 'aldryn_boilerplates.staticfile_finders.AppDirectoriesFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ] TEMPLATE_LOADERS = [ 'django.template.loaders.filesystem.Loader', # important! place right before django.template.loaders.app_directories.Loader 'aldryn_boilerplates.template_loaders.AppDirectoriesLoader', 'django.template.loaders.app_directories.Loader', ]
Now set the name of the boilerplate you want to use in your project:
ALDRYN_BOILERPLATE_NAME = 'standard'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file aldryn-boilerplates-0.3.tar.gz
.
File metadata
- Download URL: aldryn-boilerplates-0.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70f5577c3cdf7c618060e920eda98616292ba74039238ac95692d79e0c3bcb01 |
|
MD5 | ae88172f2883456147da3b405f94e1ed |
|
BLAKE2b-256 | cd59923373bc06d7c5d6f7928fceda50e67632ee8f63e87a26030562c11c0907 |