https://github.com/bruecksen/bakeup
https://github.com/bruecksen/bakeup
baking django microbakeries python
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bruecksen/bakeup
- Owner: bruecksen
- License: other
- Created: 2022-02-23T10:53:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-04T16:47:57.000Z (7 months ago)
- Last Synced: 2025-12-08T00:52:33.768Z (7 months ago)
- Topics: baking, django, microbakeries, python
- Language: Python
- Homepage: http://bakeup.org
- Size: 19.4 MB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 76
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bakeup
Best baking app ever!
[](https://github.com/cookiecutter/cookiecutter-django/)
[](https://github.com/ambv/black)
License: [Business Source License 1.1](LICENSE)
## Settings
Moved to [settings](http://cookiecutter-django.readthedocs.io/en/latest/settings.html).
## Basic Commands
### Setting up tenants
$ python manage.py migrate_schemas --shared
Create the first primary tenant, schema_name, name and domain should be **localhost**
$ python manage.py create_tenant
Edit your hosts file (/etc/hosts) and add one for the primary tenanat and for all the other tenants as well
127.0.0.1 localhost
127.0.0.1 ole.localhost
In production add subdomain to nginx config and update letsencrypt certificate:
certbot --expand -d bakeup.org,matthias.bakeup.org,niels.bakeup.org,ole.bakeup.org,hasenbrot.bakeup.org
### Load fixtures
It is important to set the proper --schema parameter to load the data into the right tenant. For local development this should be --schema=localhost
python manage.py tenant_command loaddata --schema=localhost bakeup/shop/fixtures/demo_point_of_sale.json
python manage.py tenant_command loaddata --schema=localhost bakeup/users/fixtures/demo_users.json
python manage.py tenant_command loaddata --schema=localhost bakeup/users/fixtures/groups.json
python manage.py tenant_command loaddata --schema=localhost bakeup/workshop/fixtures/demo_categories.json
python manage.py tenant_command loaddata --schema=localhost bakeup/workshop/fixtures/demo_products.json
This will also create some demo users accounts to login. You can user username: admin, password: admin.
### Create initial CMS Pages
This will create some default wagtail pages with demo content
python manage.py create_initial_wagtail_pages
### Translation
python manage.py makemessages -l de_DE -l de_DE@formal
python manage.py compilemessages
### Type checks
Running type checks with mypy:
$ mypy bakeup
### Test coverage
To run the tests, check your test coverage, and generate an HTML coverage report:
$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html
#### Running tests with pytest
$ pytest
### Live reloading and Sass CSS compilation
Moved to [Live reloading and SASS compilation](http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html).
### Sentry
Sentry is an error logging aggregator service. You can sign up for a free account at or download and host it yourself.
The system is set up with reasonable defaults, including 404 logging and integration with the WSGI application.
You must set the DSN url in production.
## Deployment
Make sure pip is up-to-date (pip install --upgrade pip) and requirements are installed (pip install -r requirements/local.txt)
Adjust fabfile.py to your needs, ex. change staging envs to fit your servername and directory or/and configure a totally different environment. We go with staging in this example
Run fab with env and deploy
$ fab staging deploy