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 .venvActivate the virtual environment (use the appropriate command for your OS).
# On Windows
.venv\Scripts\activate
# On macOS and Linux
source .venv/bin/activatepip install -r requirements.txt
python3 manage.py runserverTo access the Django admin interface, you’ll need a superuser account. Create one by running:
python3 manage.py createsuperuserFollow 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 migrateTo 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.pyTo 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 graphvizGenerate the model diagram as a .dot file:
python3 manage.py graph_models -a --dot -o feedback_models.dotConvert the .dot file to a .png image:
dot -Tpng feedback_models.dot -o feedback_models.pngFor further information on the graphs you can read the the django-extensions documentation.