This Django feedback app allows users to evaluate each other.
Create a virtual environment to keep dependencies isolated.
# Create a virtual environment
python3 -m venv .venv
Activate the virtual environment (use the appropriate command for your OS).
# On Windows
.venv\Scripts\activate
# On macOS and Linux
source .venv/bin/activate
pip install -r requirements.txt
python3 manage.py runserver
To access the Django admin interface, you’ll need a superuser account. Create one by running:
python3 manage.py createsuperuser
Follow the prompts to set up a username, email, and password.
Migrations are necessary to create and update database tables. Run the following commands to make and apply migrations when first running the app and after any change in the models:
# Prepare migrations
python3 manage.py makemigrations
# Apply migrations to the database
python3 manage.py migrate
To batch create initial users with their managers, add user data to the create_initial_users.py script and establish an initial password for them. Then run:
python3 manage.py shell < feedback/scripts/create_initial_users.py
To visualize the relationships between models, you can create a diagram using Django Extensions and Graphviz.
Install the necessary libraries:
pip install django-extensions
brew install graphviz
Generate the model diagram as a .dot file:
python3 manage.py graph_models -a --dot -o feedback_models.dot
Convert the .dot file to a .png image:
dot -Tpng feedback_models.dot -o feedback_models.png
For further information on the graphs you can read the the django-extensions documentation.