mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-20 13:30:58 +03:00
Using the docker compose watch so .venv can be ignored
This commit is contained in:
parent
1cf227b3a8
commit
e5d9ffdfbb
|
@ -100,7 +100,7 @@ def remove_utility_files():
|
|||
|
||||
|
||||
def remove_heroku_files():
|
||||
file_names = ["Procfile", "runtime.txt", "requirements.txt"]
|
||||
file_names = ["Procfile", "runtime.txt"]
|
||||
for file_name in file_names:
|
||||
if file_name == "requirements.txt" and "{{ cookiecutter.ci_tool }}".lower() == "travis":
|
||||
# don't remove the file if we are using travisci but not using heroku
|
||||
|
|
|
@ -48,7 +48,14 @@ repos:
|
|||
hooks:
|
||||
- id: djlint-reformat-django
|
||||
- id: djlint-django
|
||||
|
||||
{%- if cookiecutter.use_heroku == "y" %}
|
||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||
# uv version.
|
||||
rev: 0.4.15
|
||||
hooks:
|
||||
- id: uv-export
|
||||
args: ['--frozen', '--no-dev']
|
||||
{%- endif -%}
|
||||
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
|
||||
ci:
|
||||
autoupdate_schedule: weekly
|
||||
|
|
|
@ -40,7 +40,8 @@ jobs:
|
|||
python:
|
||||
- "3.12"
|
||||
install:
|
||||
- pip install -r requirements/local.txt
|
||||
- pip install uv
|
||||
- uv sync
|
||||
script:
|
||||
- pytest
|
||||
- uv run pytest
|
||||
{%- endif %}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
# Python build stage
|
||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS python-build-stage
|
||||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||
|
||||
ARG BUILD_ENVIRONMENT=local
|
||||
ARG APP_HOME=/app
|
||||
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
# we need to move the virtualenv outside of the $APP_HOME directory because it will be overriden by the docker compose mount
|
||||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||
|
||||
# Install apt packages
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
|
@ -13,26 +17,17 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
|
||||
# Requirements are installed here to ensure they will be cached.
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --frozen --no-install-project --no-dev \
|
||||
uv sync --no-install-project
|
||||
|
||||
ADD . ${APP_HOME}
|
||||
|
||||
ADD . /app
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen --no-dev
|
||||
uv sync
|
||||
|
||||
# Python 'run' stage
|
||||
FROM docker.io/python:3.12.7-slim-bookworm AS python-run-stage
|
||||
|
||||
ARG BUILD_ENVIRONMENT=local
|
||||
ARG APP_HOME=/app
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV BUILD_ENV=${BUILD_ENVIRONMENT}
|
||||
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
{% if cookiecutter.use_docker == "y" %}
|
||||
# devcontainer dependencies and utils
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
|
@ -58,7 +53,13 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
|
||||
# All absolute dir copies ignore workdir instruction. All relative dir copies are wrt to the workdir instruction
|
||||
# copy python dependency wheels from python-build-stage
|
||||
COPY --from=builder --chown=app:app ${APP_HOME} ${APP_HOME}
|
||||
COPY --from=python-build-stage --chown=app:app ${APP_HOME} ${APP_HOME}
|
||||
|
||||
ARG APP_HOME=/app
|
||||
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
ENV PATH="/${APP_HOME}/.venv/bin:$PATH"
|
||||
|
||||
COPY ./compose/production/django/entrypoint /entrypoint
|
||||
RUN sed -i 's/\r$//g' /entrypoint
|
||||
|
@ -82,6 +83,4 @@ RUN sed -i 's/\r$//g' /start-flower
|
|||
RUN chmod +x /start-flower
|
||||
{% endif %}
|
||||
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
ENTRYPOINT ["/entrypoint"]
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# Python build stage
|
||||
FROM python AS python-build-stage
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS python-build-stage
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
# dependencies for building Python packages
|
||||
|
@ -12,14 +10,16 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Requirements are installed here to ensure they will be cached.
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
# --mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --frozen --no-install-project --no-dev
|
||||
uv sync --no-install-project
|
||||
ADD . /app
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen --no-dev
|
||||
uv sync
|
||||
|
||||
|
||||
# Python 'run' stage
|
||||
|
@ -46,7 +46,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# copy python dependency wheels from python-build-stage
|
||||
COPY --from=builder --chown=app:app /app /app
|
||||
COPY --from=python-build-stage --chown=app:app /app /app
|
||||
|
||||
COPY ./compose/local/docs/start /start-docs
|
||||
RUN sed -i 's/\r$//g' /start-docs
|
||||
|
|
|
@ -6,7 +6,7 @@ WORKDIR ${APP_HOME}
|
|||
|
||||
COPY ./package.json ${APP_HOME}
|
||||
RUN npm install && npm cache clean --force
|
||||
COPY . ${APP_HOME}
|
||||
ADD . ${APP_HOME}
|
||||
{%- if cookiecutter.frontend_pipeline == 'Webpack' and cookiecutter.use_whitenoise == 'n' %}
|
||||
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
||||
ARG DJANGO_AWS_STORAGE_BUCKET_NAME
|
||||
|
@ -22,14 +22,11 @@ ENV DJANGO_AZURE_ACCOUNT_NAME=${DJANGO_AZURE_ACCOUNT_NAME}
|
|||
{%- endif %}
|
||||
{%- endif %}
|
||||
RUN npm run build
|
||||
|
||||
{%- endif %}
|
||||
|
||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS python-build-stage
|
||||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||
|
||||
ARG BUILD_ENVIRONMENT=production
|
||||
|
||||
# Install apt packages
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
# dependencies for building Python packages
|
||||
|
@ -43,21 +40,20 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --frozen --no-install-project --no-dev
|
||||
ADD . /app
|
||||
{%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %}
|
||||
COPY --from=client-builder ${APP_HOME} ${APP_HOME}
|
||||
{% else %}
|
||||
ADD . ${APP_HOME}
|
||||
{%- endif %}
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen --no-dev
|
||||
|
||||
|
||||
# Python 'run' stage
|
||||
FROM docker.io/python:3.12.7-slim-bookworm AS python-run-stage
|
||||
|
||||
ARG BUILD_ENVIRONMENT=production
|
||||
ARG APP_HOME=/app
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV BUILD_ENV=${BUILD_ENVIRONMENT}
|
||||
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
RUN addgroup --system django \
|
||||
|
@ -76,11 +72,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the application from the builder
|
||||
COPY --from=builder --chown=app:app /app /app
|
||||
|
||||
# Place executables in the environment at the front of the path
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
COPY --chown=django:django ./compose/production/django/entrypoint /entrypoint
|
||||
RUN sed -i 's/\r$//g' /entrypoint
|
||||
|
@ -108,16 +99,11 @@ RUN sed -i 's/\r$//g' /start-flower
|
|||
RUN chmod +x /start-flower
|
||||
{%- endif %}
|
||||
|
||||
# Copy the application from the builder
|
||||
COPY --from=python-build-stage --chown=django:django ${APP_HOME} ${APP_HOME}
|
||||
|
||||
# copy application code to WORKDIR
|
||||
{%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %}
|
||||
COPY --from=client-builder --chown=django:django ${APP_HOME} ${APP_HOME}
|
||||
{% else %}
|
||||
COPY --chown=django:django . ${APP_HOME}
|
||||
{%- endif %}
|
||||
|
||||
# make django owner of the WORKDIR directory as well.
|
||||
RUN chown -R django:django ${APP_HOME}
|
||||
# Place executables in the environment at the front of the path
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
USER django
|
||||
|
||||
|
|
|
@ -9,8 +9,22 @@ services:
|
|||
- ./.envs/.local/.django
|
||||
volumes:
|
||||
- ./docs:/docs:z
|
||||
- ./config:/app/config:z
|
||||
- ./{{ cookiecutter.project_slug }}:/app/{{ cookiecutter.project_slug }}:z
|
||||
develop:
|
||||
# Create a `watch` configuration to update the appl
|
||||
# https://docs.docker.com/compose/file-watch/#compose-watch-versus-bind-mounts
|
||||
watch:
|
||||
# Sync the working directory with the `/app` directory in the container
|
||||
- action: sync
|
||||
path: {{ cookiecutter.project_slug }}
|
||||
target: /app/{{ cookiecutter.project_slug }}
|
||||
# Exclude the project virtual environment — it could be for a
|
||||
# different platform in the container
|
||||
ignore:
|
||||
- .venv/
|
||||
|
||||
# Rebuild the image on changes to the `pyproject.toml`
|
||||
- action: rebuild
|
||||
path: ./pyproject.toml
|
||||
ports:
|
||||
- '9000:9000'
|
||||
command: /start-docs
|
||||
|
|
|
@ -18,8 +18,22 @@ services:
|
|||
{%- if cookiecutter.use_mailpit == 'y' %}
|
||||
- mailpit
|
||||
{%- endif %}
|
||||
volumes:
|
||||
- .:/app:z
|
||||
develop:
|
||||
# Create a `watch` configuration to update the appl
|
||||
# https://docs.docker.com/compose/file-watch/#compose-watch-versus-bind-mounts
|
||||
watch:
|
||||
# Sync the working directory with the `/app` directory in the container
|
||||
- action: sync
|
||||
path: .
|
||||
target: /app
|
||||
# Exclude the project virtual environment — it could be for a
|
||||
# different platform in the container
|
||||
ignore:
|
||||
- .venv/
|
||||
|
||||
# Rebuild the image on changes to the `pyproject.toml`
|
||||
- action: rebuild
|
||||
path: ./pyproject.toml
|
||||
env_file:
|
||||
- ./.envs/.local/.django
|
||||
- ./.envs/.local/.postgres
|
||||
|
|
|
@ -140,3 +140,153 @@ extend-unsafe-fixes = [
|
|||
|
||||
[tool.ruff.lint.isort]
|
||||
force-single-line = true
|
||||
|
||||
[tool.uv]
|
||||
dev-dependencies = [
|
||||
"watchdog==4.0.2", # https://github.com/gorakhargosh/watchdog
|
||||
"Werkzeug[watchdog]==3.0.4", # https://github.com/pallets/werkzeug
|
||||
"ipdb==0.13.13", # https://github.com/gotcha/ipdb
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
"psycopg[c]==3.2.3", # https://github.com/psycopg/psycopg
|
||||
{%- else %}
|
||||
"psycopg[binary]==3.2.3", # https://github.com/psycopg/psycopg
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
||||
"watchfiles==0.24.0", # https://github.com/samuelcolvin/watchfiles
|
||||
{%- endif %}
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
"mypy==1.11.2", # https://github.com/python/mypy
|
||||
"django-stubs[compatible-mypy]==5.1.0", # https://github.com/typeddjango/django-stubs
|
||||
"pytest==8.3.3", # https://github.com/pytest-dev/pytest
|
||||
"pytest-sugar==1.0.0", # https://github.com/Frozenball/pytest-sugar
|
||||
{%- if cookiecutter.use_drf == "y" %}
|
||||
"djangorestframework-stubs==3.15.1", # https://github.com/typeddjango/djangorestframework-stubs
|
||||
{%- endif %}
|
||||
|
||||
# Documentation
|
||||
# ------------------------------------------------------------------------------
|
||||
"sphinx==7.4.7", # https://github.com/sphinx-doc/sphinx
|
||||
"sphinx-autobuild==2024.10.3", # https://github.com/GaretJax/sphinx-autobuild
|
||||
|
||||
# Code quality
|
||||
# ------------------------------------------------------------------------------
|
||||
"ruff==0.6.9", # https://github.com/astral-sh/ruff
|
||||
"coverage==7.6.1", # https://github.com/nedbat/coveragepy
|
||||
"djlint==1.35.2", # https://github.com/Riverside-Healthcare/djLint
|
||||
"pre-commit==3.8.0", # https://github.com/pre-commit/pre-commit
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
"factory-boy==3.3.1", # https://github.com/FactoryBoy/factory_boy
|
||||
|
||||
"django-debug-toolbar==4.4.6", # https://github.com/jazzband/django-debug-toolbar
|
||||
"django-extensions==3.2.3", # https://github.com/django-extensions/django-extensions
|
||||
"django-coverage-plugin==3.1.0", # https://github.com/nedbat/django_coverage_plugin
|
||||
"pytest-django==4.9.0", # https://github.com/pytest-dev/pytest-django
|
||||
]
|
||||
|
||||
[project]
|
||||
name = "cookiecutter-django"
|
||||
version = "2024.10.04"
|
||||
description = "A Cookiecutter template for creating production-ready Django projects quickly."
|
||||
readme = "README.md"
|
||||
|
||||
license = { text = "BSD" }
|
||||
authors = [
|
||||
{ name = "Daniel Roy Greenfeld", email = "pydanny@gmail.com" },
|
||||
]
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"python-slugify==8.0.4", # https://github.com/un33k/python-slugify
|
||||
"Pillow==10.4.0", # https://github.com/python-pillow/Pillow
|
||||
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
||||
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
||||
"rcssmin==1.1.2", # --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||
{%- else %}
|
||||
"rcssmin==1.1.2", # https://github.com/ndparker/rcssmin
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
"argon2-cffi==23.1.0", # https://github.com/hynek/argon2_cffi
|
||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||
"whitenoise==6.7.0", # https://github.com/evansd/whitenoise
|
||||
{%- endif %}
|
||||
"redis==5.1.1", # https://github.com/redis/redis-py
|
||||
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
|
||||
"hiredis==3.0.0", # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_celery == "y" %}
|
||||
"celery==5.4.0", # pyup: < 6.0 # https://github.com/celery/celery
|
||||
"django-celery-beat==2.7.0", # https://github.com/celery/django-celery-beat
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
"flower==2.0.1", # https://github.com/mher/flower
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' %}
|
||||
"uvicorn[standard]==0.31.0", # https://github.com/encode/uvicorn
|
||||
"uvicorn-worker==0.2.0", # https://github.com/Kludex/uvicorn-worker
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
"django==5.0.9", # pyup: < 5.1 # https://www.djangoproject.com/
|
||||
"django-environ==0.11.2", # https://github.com/joke2k/django-environ
|
||||
"django-model-utils==5.0.0", # https://github.com/jazzband/django-model-utils
|
||||
"django-allauth[mfa]==65.0.2", # https://github.com/pennersr/django-allauth
|
||||
"django-crispy-forms==2.3", # https://github.com/django-crispy-forms/django-crispy-forms
|
||||
"crispy-bootstrap5==2024.10", # https://github.com/django-crispy-forms/crispy-bootstrap5
|
||||
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
||||
"django-compressor==4.5.1", # https://github.com/django-compressor/django-compressor
|
||||
{%- endif %}
|
||||
"django-redis==5.4.0", # https://github.com/jazzband/django-redis
|
||||
{%- if cookiecutter.use_drf == 'y' %}
|
||||
# Django REST Framework
|
||||
"djangorestframework==3.15.2", # https://github.com/encode/django-rest-framework
|
||||
"django-cors-headers==4.4.0", # https://github.com/adamchainz/django-cors-headers
|
||||
# DRF-spectacular for api documentation
|
||||
"drf-spectacular==0.27.2", # https://github.com/tfranzel/drf-spectacular
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
|
||||
"django-webpack-loader==3.1.1", # https://github.com/django-webpack/django-webpack-loader
|
||||
{%- endif %}
|
||||
"gunicorn==23.0.0", # https://github.com/benoitc/gunicorn
|
||||
"psycopg[c]==3.2.3", # https://github.com/psycopg/psycopg
|
||||
{%- if cookiecutter.use_whitenoise == 'n' %}
|
||||
"Collectfasta==3.2.0", # https://github.com/jasongi/collectfasta
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
"sentry-sdk==2.15.0", # https://github.com/getsentry/sentry-python
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
||||
"hiredis==3.0.0", # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
||||
"django-storages[s3]==1.14.4", # https://github.com/jschneier/django-storages
|
||||
{%- elif cookiecutter.cloud_provider == 'GCP' %}
|
||||
"django-storages[google]==1.14.4", # https://github.com/jschneier/django-storages
|
||||
{%- elif cookiecutter.cloud_provider == 'Azure' %}
|
||||
"django-storages[azure]==1.14.4", # https://github.com/jschneier/django-storages
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.mail_service == 'Mailgun' %}
|
||||
"django-anymail[mailgun]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
|
||||
"django-anymail[amazon-ses]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
||||
"django-anymail[mailjet]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||
"django-anymail[mandrill]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
||||
"django-anymail[postmark]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
||||
"django-anymail[sendgrid]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Brevo' %}
|
||||
"django-anymail[brevo]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
||||
"django-anymail[sparkpost]==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
|
||||
"django-anymail==12.0", # https://github.com/anymail/django-anymail
|
||||
{%- endif %}
|
||||
]
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# This file is expected by Heroku.
|
||||
|
||||
-r requirements/production.txt
|
|
@ -1,51 +0,0 @@
|
|||
python-slugify==8.0.4 # https://github.com/un33k/python-slugify
|
||||
Pillow==11.0.0 # https://github.com/python-pillow/Pillow
|
||||
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
||||
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
||||
rcssmin==1.1.2 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||
{%- else %}
|
||||
rcssmin==1.1.2 # https://github.com/ndparker/rcssmin
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
|
||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||
whitenoise==6.7.0 # https://github.com/evansd/whitenoise
|
||||
{%- endif %}
|
||||
redis==5.2.0 # https://github.com/redis/redis-py
|
||||
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
|
||||
hiredis==3.0.0 # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_celery == "y" %}
|
||||
celery==5.4.0 # pyup: < 6.0 # https://github.com/celery/celery
|
||||
django-celery-beat==2.7.0 # https://github.com/celery/django-celery-beat
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
flower==2.0.1 # https://github.com/mher/flower
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' %}
|
||||
uvicorn[standard]==0.32.0 # https://github.com/encode/uvicorn
|
||||
uvicorn-worker==0.2.0 # https://github.com/Kludex/uvicorn-worker
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django==5.0.9 # pyup: < 5.1 # https://www.djangoproject.com/
|
||||
django-environ==0.11.2 # https://github.com/joke2k/django-environ
|
||||
django-model-utils==5.0.0 # https://github.com/jazzband/django-model-utils
|
||||
django-allauth[mfa]==65.1.0 # https://github.com/pennersr/django-allauth
|
||||
django-crispy-forms==2.3 # https://github.com/django-crispy-forms/django-crispy-forms
|
||||
crispy-bootstrap5==2024.10 # https://github.com/django-crispy-forms/crispy-bootstrap5
|
||||
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
||||
django-compressor==4.5.1 # https://github.com/django-compressor/django-compressor
|
||||
{%- endif %}
|
||||
django-redis==5.4.0 # https://github.com/jazzband/django-redis
|
||||
{%- if cookiecutter.use_drf == 'y' %}
|
||||
# Django REST Framework
|
||||
djangorestframework==3.15.2 # https://github.com/encode/django-rest-framework
|
||||
django-cors-headers==4.5.0 # https://github.com/adamchainz/django-cors-headers
|
||||
# DRF-spectacular for api documentation
|
||||
drf-spectacular==0.27.2 # https://github.com/tfranzel/drf-spectacular
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
|
||||
django-webpack-loader==3.1.1 # https://github.com/django-webpack/django-webpack-loader
|
||||
{%- endif %}
|
|
@ -1,43 +0,0 @@
|
|||
-r production.txt
|
||||
|
||||
Werkzeug[watchdog]==3.0.6 # https://github.com/pallets/werkzeug
|
||||
ipdb==0.13.13 # https://github.com/gotcha/ipdb
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg
|
||||
{%- else %}
|
||||
psycopg[binary]==3.2.3 # https://github.com/psycopg/psycopg
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
||||
watchfiles==0.24.0 # https://github.com/samuelcolvin/watchfiles
|
||||
{%- endif %}
|
||||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
mypy==1.13.0 # https://github.com/python/mypy
|
||||
django-stubs[compatible-mypy]==5.1.1 # https://github.com/typeddjango/django-stubs
|
||||
pytest==8.3.3 # https://github.com/pytest-dev/pytest
|
||||
pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar
|
||||
{%- if cookiecutter.use_drf == "y" %}
|
||||
djangorestframework-stubs==3.15.1 # https://github.com/typeddjango/djangorestframework-stubs
|
||||
{%- endif %}
|
||||
|
||||
# Documentation
|
||||
# ------------------------------------------------------------------------------
|
||||
sphinx==8.1.3 # https://github.com/sphinx-doc/sphinx
|
||||
sphinx-autobuild==2024.10.3 # https://github.com/GaretJax/sphinx-autobuild
|
||||
|
||||
# Code quality
|
||||
# ------------------------------------------------------------------------------
|
||||
ruff==0.7.1 # https://github.com/astral-sh/ruff
|
||||
coverage==7.6.4 # https://github.com/nedbat/coveragepy
|
||||
djlint==1.35.2 # https://github.com/Riverside-Healthcare/djLint
|
||||
pre-commit==4.0.1 # https://github.com/pre-commit/pre-commit
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
factory-boy==3.3.1 # https://github.com/FactoryBoy/factory_boy
|
||||
|
||||
django-debug-toolbar==4.4.6 # https://github.com/jazzband/django-debug-toolbar
|
||||
django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions
|
||||
django-coverage-plugin==3.1.0 # https://github.com/nedbat/django_coverage_plugin
|
||||
pytest-django==4.9.0 # https://github.com/pytest-dev/pytest-django
|
|
@ -1,44 +0,0 @@
|
|||
# PRECAUTION: avoid production dependencies that aren't in development
|
||||
|
||||
-r base.txt
|
||||
|
||||
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
|
||||
psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg
|
||||
{%- if cookiecutter.use_whitenoise == 'n'and cookiecutter.cloud_provider in ('AWS', 'GCP') %}
|
||||
Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
sentry-sdk==2.17.0 # https://github.com/getsentry/sentry-python
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
||||
hiredis==3.0.0 # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
||||
django-storages[s3]==1.14.4 # https://github.com/jschneier/django-storages
|
||||
{%- elif cookiecutter.cloud_provider == 'GCP' %}
|
||||
django-storages[google]==1.14.4 # https://github.com/jschneier/django-storages
|
||||
{%- elif cookiecutter.cloud_provider == 'Azure' %}
|
||||
django-storages[azure]==1.14.4 # https://github.com/jschneier/django-storages
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.mail_service == 'Mailgun' %}
|
||||
django-anymail[mailgun]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
|
||||
django-anymail[amazon-ses]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
||||
django-anymail[mailjet]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||
django-anymail[mandrill]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
||||
django-anymail[postmark]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
||||
django-anymail[sendgrid]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Brevo' %}
|
||||
django-anymail[brevo]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
||||
django-anymail[sparkpost]==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
|
||||
django-anymail==12.0 # https://github.com/anymail/django-anymail
|
||||
{%- endif %}
|
Loading…
Reference in New Issue
Block a user