Convert a bootstrap studio file in a django (Jinja like) template.
Credit: Original idea coming from lingster/django-bootstrap-studio-tools
Index
This export script will allow you to create custom attributes while developing design with Bootstrap Studio. Those attributes will be convert to their corresponding django template tag inside an export directory.
Finally, export script will move all html/css/js/img generated by Bootstrap Studio to a DJANGO_PROJECT.
Django is having an application based architecture, Bootstrap Studio developement must follow this architecture, create app subfolder and move file inside it. In Boostrap Studio, always create application folder inside html, img, js, style folders. (see tests)
WARNING: Require python 3.6 or higher
Install project dependencies :
pip install -r requirements.txt You can use a virtual env inside directory of the export script, and specify folder in env file using VIRTUAL_ENV (see env file).
Go to Export Options.
- In
Advanced > Export Script, specify the absolute path ofdjango_export.shon your local machine. - Enable options
Use a CDN for libraries,Use absolute paths - Specify
Export destinationas well
Save your configuration for later export.
Rename env.template to env.
Available varibles:
DJANGO_PROJECT(mandatory) : Absolute path of your django project folder.VIRTUAL_ENV(optionnal) : relative path of virtual env directory, MUST BE within this script folder.
To see if everything is running properly : python -m unittest discover test
See all available features
Your help is welcome ! Here some contribution example:
- Ask/work for new feature
- Add issue/fix for bug
- Correct spelling/English mistake
- Improve documentation
- Code review
- Test coverage
- ...