Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rehborn/djangocms-boilerplate
Pre-heated Boilerplate with common defaults to get started quickly (outdated djangocms v3) - do not use the prebuild docker image in production (it includes packages with known vulnerabilities)
https://github.com/rehborn/djangocms-boilerplate
boilerplate django django-cms django-cms-example docker
Last synced: about 2 hours ago
JSON representation
Pre-heated Boilerplate with common defaults to get started quickly (outdated djangocms v3) - do not use the prebuild docker image in production (it includes packages with known vulnerabilities)
- Host: GitHub
- URL: https://github.com/rehborn/djangocms-boilerplate
- Owner: rehborn
- License: mit
- Created: 2023-09-08T14:36:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-09T19:36:14.000Z (6 days ago)
- Last Synced: 2025-01-10T10:24:10.463Z (6 days ago)
- Topics: boilerplate, django, django-cms, django-cms-example, docker
- Language: Python
- Homepage: https://hub.docker.com/r/rehborn/djangocms-boilerplate
- Size: 340 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DjangoCMS Boilerplate
Pre-heated Boilerplate with common defaults to get started quickly
### Features
- Pre-build Docker Image with DjangoCMS
- Pre-themed with Bootstrap-5, Font-Awesome and Simple-Icons
- minimal site configuration in yaml `config.yml`### Pre-installed plugins
- teamssee [Roadmap](#1) for planned features
## Customization
minimal configuration can be found in [`example/`](example):
- [`config.yml`](example/config.yml): minimal configuration wrapper
- `static`: static and theme files (`theme.scss`, `theme.js`)
- `templates`: custom templates (page templates defined in `config.yml` and overwrite defaults)### Templates
place templates in `config/templates/`
defaults that can be overwritten:
```
- base.html: defined blocks `title`, `css`, `content`, `js`
- css.html:
- header.html
- navigation.html
- nav-items.html
- languages.html
- footer.html
```#### default content templates (`CMS_TEMPLATES`):
- `default.html`
- `single-page.html` (render all plugins of sub-pages)#### Images depending on `prefers-color-scheme` (aka Dark Mode)
```html
```### Static
#### Style (SCSS)
`theme.scss`
```scss
/* custom theme */// custom css
@import "../../node_modules/bootstrap/scss/bootstrap";
```#### default static files that can be overwritten
- `logo.png`
- `favicon.ico`
- `theme.scss`
- `extras.css`
- `theme.js`## Workflow
#### Setup new Instance
```
cp -R example/ config/
docker compose up -d
docker compose exec cms poetry run python /app/src/manage.py migrate
docker compose exec cms poetry run python /app/src/manage.py boil
```
- http://127.0.0.1:8000/admin/> `demo`:`demo`
**Update UserSettings**
- http://127.0.0.1:8000/admin/base/usersettings/## Deployment
see `docker-compose-test.yml` for orientation (do not use in production)
## Development
### Setup
#### Install Dependencies
```shell
poetry install
npm install
```#### Initialize CMS
```shell
cp -R example/ config
./manage.py migrate
./manage.py cms check
./manage.py boil
```#### run postgres and redis using docker
```shell
docker compose up postgres
docker compose up redis
```#### run commands inside container
### Test Deployment
#### Build Image
```shell
docker compose build --no-cache
```#### Run Container
```shell
docker compose -f docker-compose-test.yml up
```#### Shortcuts
```shell
docker compose -f docker-compose-test.yml run job-migrate
docker compose -f docker-compose-test.yml run job-once
docker compose -f docker-compose-test.yml exec static ls /usr/share/nginx/html/{static,media}
docker compose -f docker-compose-test.yml exec cms poetry run python /app/manage.py boil
docker compose -f docker-compose-test.yml exec cms bash
```## Declare independence
if at any point you decide to break out of the constraints of this projects or remove it as a dependency to bake your
own, you can follow these vague steps (_untested_):- fork repository
- remove use of `env()` and `config()` in `settings.py`
- migrate values of `config.yml` to `settings.py`
- move templates from `config/templates` to `src/templates/`
- move static files from `config/static` to `src/static/`
- create and publish your own docker image
- update `image:` in your deployment## Dependencies
this project wouldn't be possible without open source
### Frameworks
- [Django](https://github.com/django/django)
- [DjangoCMS](https://github.com/django-cms/django-cms)for a full list see [pyproject.toml](pyproject.toml)
### Theme
- [Boostrap](https://github.com/twbs/bootstrap)
- [Font Awesome](https://github.com/FortAwesome/Font-Awesome)
- [Simple Icons](https://github.com/simple-icons/simple-icons)
- [Flag Icons](https://www.npmjs.com/package/flag-icons)for a full list see [package.json](package.json)