grooveshop django api
v0.187.2
本專案使用 Django 和 Django REST Framework 提供強大的無頭 API,並分別支援 Uvicorn (ASGI) 和 Gunicorn (WSGI) 促進的同步和非同步環境。它利用 Django Allauth 進行身份驗證,利用 Celery 和 Redis 進行任務管理,並利用 Postgres 進行資料儲存。功能包括快取、多語言支援和全面的測試覆蓋範圍。該 API 還包括一個內建的 Django 管理面板,用於高效的管理操作。
該專案中的 Django 應用程式包括:
該專案是根據 MIT 許可證開源的。有關更多詳細信息,請參閱許可證文件。
docker compose run backend sh -c "python manage.py makemigrations --noinput"
docker compose run backend sh -c "python manage.py migrate"
docker compose run backend sh -c "python manage.py createsuperuser"
docker compose run backend sh -c "python manage.py collectstatic --noinput"
docker compose run backend sh -c "python manage.py test tests/"
docker compose run backend sh -c "coverage run --omit=*/migrations/*,*/management/*,*/manage.py,*/setup.py,*/asgi.py,*/wsgi.py --source='.' manage.py test tests/ && coverage report && coverage html"
docker compose run backend sh -c "coverage html"
docker compose run backend sh -c "python manage.py seed_all"
docker compose -f <docker-compose-file.yml> up -d --build
docker exec -it <container_id> <command>
docker exec -it <container_id> sh -c "<command>"
docker exec -it <container_id> sh -c "python manage.py makemessages -l <locale>"
docker exec -it <container_id> sh -c "python manage.py makemessages --all --ignore=env"
docker exec -it <container_id> sh -c "python manage.py compilemessages --ignore=env"
celery -A core beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
celery -A core worker -E -l info --pool=solo
celery -A core flower --broker=amqp://guest:guest@localhost:5672// --broker_api=http://guest:guest@localhost:15672/api// --port=5555
uvicorn asgi:application --port 8000 --workers 4 --log-level debug --reload
pip install virtualenv
virtualenv <env_name>
source <env_name>/bin/activate
<env_name>Scriptsactivate
deactivate
pip install -r requirements.txt
pip install -r requirements/<env_name>.txt
pip install django
django-admin startproject <project_name>
python manage.py startapp <app_name>
python manage.py makemigrations
python manage.py migrate
python manage.py sqlflush
python manage.py factory_seed --model="BlogPost" --count="100"
python manage.py seed_all --model-counts="Country=10,Product=100"
python manage.py createsuperuser
python manage.py collectstatic
python manage.py test
python manage.py shell
python manage.py shell_plus
python manage.py dbshell
python manage.py runserver
cd src
pre-commit install
pre-commit run --all-files
black .
curl -sSL https://install.python-poetry.org | python3 -
Windows: (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
poetry new <project_name>
poetry install
poetry add <dependency_name>
和poetry remove <dependency_name>
poetry update <dependency_name>
和poetry lock
poetry run <script_name>
poetry shell
pip-upgrade
pip install strawberry-graphql
strawberry server
strawberry server core.graphql.schema:schema
python manage.py spectacular --color --file schema.yml
刪除遠端標籤:
git tag -l | xargs -n 1 git push --delete origin
刪除本機標籤:
git tag -l | xargs git tag -d