https://github.com/stuartmackay/django-bootstrap-template
A template for a custom build of Bootstrap 5 which can be used in a Django project
https://github.com/stuartmackay/django-bootstrap-template
bootstrap5 django template website
Last synced: 2 months ago
JSON representation
A template for a custom build of Bootstrap 5 which can be used in a Django project
- Host: GitHub
- URL: https://github.com/stuartmackay/django-bootstrap-template
- Owner: StuartMacKay
- Created: 2024-01-04T19:48:26.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-05T04:50:45.000Z (over 2 years ago)
- Last Synced: 2025-08-03T06:37:54.856Z (10 months ago)
- Topics: bootstrap5, django, template, website
- Language: JavaScript
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
Awesome Lists containing this project
README
=========================
Django Bootstrap Template
=========================
This template can be used to build a custom version of Bootstrap 5 for
stying your Django templates. It is intended to be used with Django sites
created using the `django-project-template`_.
.. _django-project-template: https://github.com/StuartMacKay/django-project-template
Features
--------
* Configured with `Bootstrap 5: `_
* Built with `Webpack 5: `_
Prerequisites
-------------
You will need to install `node.js`_. If you have several projects then
`Node Version Manager`_ will make your life a lot easier.
.. _node.js: https://nodejs.org/en/download
.. _Node Version Manager: https://github.com/nvm-sh/nvm
How To Use
----------
Check out the repository to the ``frontend`` directory of your project:
.. code-block:: shell
git clone git@github.com:StuartMacKay/django-bootstrap-template.git frontend
Next, build the assets:
.. code-block:: shell
cd frontend
nvm use
npm install
npm run build
The Bootstrap files, and favicon images are written to the ```frontend/dist```
directory, where Django will find them. See the STATICFILES_DIRS setting.
If you are likely to be making frequent changes to the bootstrap files then
you can have webpack compile everything automatically whenever any of the scss
or js files are changed, by running:
.. code-block:: shell
npm run watch
The Django site will pick up the changes whenever the page is loaded or refreshed.