A simple Django project to play around with Django features.
Warning: This project is not meant to be used in production !!!
This simple project use the following libraries:
- djangorestframework: for building APIs
- django: the web framework
- pytest-django: for testing
docker-compose
and docker
are your best friends here!
Check the official documentation for more information. Here below some useful commands:
# Build required images
docker-compose build
# Build required images without using caching
docker-compose build --no-cache
# Run a command inside the container
docker-compose exec web <command>
# Add a new python package
docker-compose exec web poetry add <package_name>
# Run all tests
docker-compose exec web pytest
# Run a specific test
docker-compose exec web pytest server/tests/tests_school/test_views.py::test_create_course
# Start the project
docker-compose up
# Cleanup docker stuff related to this project
docker-compose down -v --remove-orphans --rmi all
docker rmi -f $(docker-compose images -q) 2>/dev/null