====================Uso==================================
cd ~
git clone https://github.com/iago-mansur/promocao_api.git
cd promocao_api
docker-compose up -d
==================Desenvolvimento========================
mkdir promocao_api
cd promocao_api
python --version
python3 -m venv .venv
. .venv/bin/activate
pip install django
pip install djangorestframework
django-admin startproject promocao_api .
python manage.py runserver
CONTROL-C
django-admin startapp api
pip freeze > requirements.txt
python manage.py migrate
python manage.py createsuperuser
admin / [email protected] / 123456 / y
atualizar settings.py
atualizar model.py
atualizar admin.py
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
criar serializer.py
criar views.py
criar router.py
editar urls.py
python manage.py migrate
python manage.py runserver
Select Interpreter
Recommended
editar requirements.txt