Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Convert a bootstrap studio file in a django (Jinja like) template.

License

Notifications You must be signed in to change notification settings

AbcSxyZ/bootstrap-studio-to-django-template

Repository files navigation

bootstrap-studio-to-django-template

Build Status Coverage Status

Export a Bootstrap Studio design into a Django project folder.

Credit: Improvement of lingster/django-bootstrap-studio-tools

Index

How it works

This export script will allow you to create custom HTML 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 subfolder inside Pages, Styles, JavaScript, Fonts and Images folders. (see tests)

Installation

Python

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).

Bootstrap studio

Go to Export Options.

  • In Advanced > Export Script, specify the absolute path of django_export.sh on your local machine.
  • Enable options Use a CDN for libraries, Use absolute paths
  • Specify Export destination as well

Save your configuration for later export.

Env file

Rename env.template to env.

Available variables:

  • 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.

Test

To see if everything is running properly : python -m unittest discover test

Features

See all available features

Contribute

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
  • Whatever you have in mind for the software :)

License

Free software under AGPL. Please share your modification to respect term of license :)

About

Convert a bootstrap studio file in a django (Jinja like) template.

Resources

License

Stars

Watchers

Forks

Packages

No packages published