https://github.com/cedadev/fwtheme-django
Vanilla Bootstrap v4 theme for django apps
https://github.com/cedadev/fwtheme-django
Last synced: 3 months ago
JSON representation
Vanilla Bootstrap v4 theme for django apps
- Host: GitHub
- URL: https://github.com/cedadev/fwtheme-django
- Owner: cedadev
- License: mit
- Created: 2018-03-09T01:07:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T16:44:53.000Z (over 2 years ago)
- Last Synced: 2025-02-24T03:27:00.886Z (over 1 year ago)
- Language: HTML
- Size: 75.2 KB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fwtheme-django
Django app providing vanilla Bootstrap v5 theme for Django-based web apps.
Pulls in "default" theme from Bootswatch.
## Installation
`fwtheme-django` can be installed directly from Github using pip:
```
$ pip install git+https://git@github.com/cedadev/fwtheme-django.git
```
## Variables
If your application would be best served in a full width container, you can use
the boolean variable `CONTAINER_FLUID` in your settings.py
| Variable | Options |
|------------------|-----------------|
| `CONTAINER_FLUID`|`True` or `False`|
## Overriding the error page templates
The custom error pages provide a basic, styled message but provide no context.
The help beacon is present on the error page so that users can ask for assistance
and we are given the URL the user tried when they encountered the issue.
In some case you may want to add extra detail to the error pages. If you just want a different base
template or add other static text, you simply create corresponding templates in the root of your template
tree for you app. **Make sure your app is higher in the app list than `fwtheme-django`**
e.g
```
app/
templates/
app/
template1.html
template2.html
...
400.html
403.html
404.html
500.html
```
See [the code](https://github.com/django/django/blob/master/django/views/defaults.py) to see what context is available.
Under the default views the avialable context:
| Error | Context |
|-------|---------|
| 400 | |
| 403 | `exception` |
| 404 | `request_path` `exception` |
| 500 | |
If you need to add dynamic content, you will have to [override the views](https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views).