Database
Schema
The following schema is an entity-relationship diagram of the database, simplified for your convenience 😉
In Django, entities are represented by a model class, and relationships are directly represented by OneToOneField, ForeignKey or ManyToManyField fields. Their translation to SQL is done by the Django ORM.
Want more? Here is the full schema, auto-generated
This schema has been generated by django-extensions
with the graphviz
program.
It shows all tables from the database, including the hidden ones created by
Django itself.
How to generate this schema
This model has been automatically generated with the method described on this post.
If you have problems in running the method described above, you have to run before the other commands this command:
sudo apt-get install libgraphviz-dev libpython3.7-dev
Use fake data
You can generate fake random data for the database using this command:
pipenv run fakedata
You can also generate data for a specific app, for example event
:
pipenv run fakedata event
The fake data generators are defined in the factories.py
files of each app,
using factory-boy
and
Faker
.