A Django app to swap the front-end scaffolding for the application.
Project description
Django frontend presets provide a command line that allow you to rapidly swap the front-end scaffolding for the application.
- Choices are:
reset (reset the inital structure)
bootstrap (Setup Bootstrap)
vue (Setup VueJs)
react (Setup React)
The first time you run the command, it will move templates, static and locale directory to resources at the root of the project, setup the base structure, write your package.json and webpack.mix.js.
Quick start
- Install python dependencies.
pip install django-frontend-presets –extra-index-url https://api.packagr.app/xKNhDZcWW/
Add “django_frontend_presets” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django_frontend_presets.apps.DjangoFrontendPresetsConfig', ]
- Run the “preset” command to generate the base structure.
python manage.py preset [reset, bootstrap, vue, react]
- Install javascript dependencies.
npm install && npm run dev
Update your Django settings:
LOCALE_PATHS = [str(ROOT_DIR.path("resources", "locale"))] STATICFILES_DIRS = [str(ROOT_DIR.path("resources", "static"))] TEMPLATES[0]['DIRS'] = [str(ROOT_DIR.path("resources", "templates"))]
Enjoy :)
Credit
The webpack configuration used came from Laravel Mix made by Jeffrey Way.
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
Built Distribution
Hashes for django-frontend-presets-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 785230b6d15b83b5ff55754ddae7f09f4fbefeb2bdd4877578c3085e0c1902e4 |
|
MD5 | f726705d01bfc1fba7930d98fa3490c3 |
|
BLAKE2b-256 | 59434a6d9b55c48e21a4bd7b06899c05be5b7b68e1a23f80fe4111565b948c59 |
Hashes for django_frontend_presets-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a636b7b2686c1072dcb4afee19ebbef4ea34a17db3b09cee197eb4192189562d |
|
MD5 | 36d299e79d9adf1205c4c65d77ec90dc |
|
BLAKE2b-256 | 35aa1409b395a5f5c52d8d8bdec3f0ae890d903230af12f25d784d1dd55a65c9 |