This project is about creating a website for the mighty Pong contest!
- Use a Framework as backend. (Django)
- Use a front-end framework or toolkit. (Bootstrap)
- Use a database for the backend. (postgresql)
- Standard user management, authentication, users across tournaments.
- Remote players.
- Introduce an AI Opponent.
- Implement Two-Factor Authentication (2FA) and JWT.
- Expanding Browser Compatibility. (Firefox)
- Multiple language supports. (English, French & Portuguese)
- Replacing Basic Pong with Server-Side Pong and Implementing an API.
- Fill the information needed in .env_example
- Copy it as
.env
- Start with
make
- make -> build and start
- make mac -> start without hot reloading, when not admin
- make prod -> deploy in production mode
- make build -> create the containers
- make down -> stop the containers
- make clean -> clean all the container
- make fclean -> clean all the container and remove the volume
- make test -> launch Django tests
- make typo -> run Flake8 on Django
- make logs -> print containers logs
- make ls -> show the images, containers and volumes
run all commands through docker compose docker-compose run --rm backend sh -c "python manage.py connectstatic"
- create django project via docker ?? a bit strange docker compose run --rm backend sh -c "django-admin startproject app ."
- create super users docker compose run --rm backend sh -c "python manage.py createsuperuser"
- create a new project within the app docker compose run --rm backend sh -c "python manage.py startapp recipe"
- after model updates docker compose run --rm backend sh -c "python manage.py makemigrations" docker compose run --rm backend sh -c "python manage.py migrate"
- docker up docker compose up
- import channels.layers channel_layer = channels.layers.get_channel_layer() from asgiref.sync import async_to_sync async_to_sync(channel_layer.send)('test_channel', {'type': 'hello'})
async_to_sync(channel_layer.receive)('test_channel') - docker compose run --rm backend sh -c 'python manage.py shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"'