mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-09-22 19:56:41 +03:00
Update for custom CC-Django
This commit is contained in:
parent
d0849f275e
commit
c722c8ea75
|
@ -10,6 +10,7 @@ REDIS_URL=redis://redis:6379/0
|
||||||
|
|
||||||
# Celery
|
# Celery
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
CELERY_BROKER_URL="${REDIS_URL}"
|
||||||
|
|
||||||
# Flower
|
# Flower
|
||||||
CELERY_FLOWER_USER=!!!SET CELERY_FLOWER_USER!!!
|
CELERY_FLOWER_USER=!!!SET CELERY_FLOWER_USER!!!
|
||||||
|
|
|
@ -5,3 +5,4 @@ POSTGRES_PORT=5432
|
||||||
POSTGRES_DB={{ cookiecutter.project_slug }}
|
POSTGRES_DB={{ cookiecutter.project_slug }}
|
||||||
POSTGRES_USER=!!!SET POSTGRES_USER!!!
|
POSTGRES_USER=!!!SET POSTGRES_USER!!!
|
||||||
POSTGRES_PASSWORD=!!!SET POSTGRES_PASSWORD!!!
|
POSTGRES_PASSWORD=!!!SET POSTGRES_PASSWORD!!!
|
||||||
|
DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
|
||||||
|
|
|
@ -64,6 +64,7 @@ REDIS_URL=redis://redis:6379/0
|
||||||
{% if cookiecutter.use_celery == 'y' %}
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
# Celery
|
# Celery
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
CELERY_BROKER_URL="${REDIS_URL}"
|
||||||
|
|
||||||
# Flower
|
# Flower
|
||||||
CELERY_FLOWER_USER=!!!SET CELERY_FLOWER_USER!!!
|
CELERY_FLOWER_USER=!!!SET CELERY_FLOWER_USER!!!
|
||||||
|
|
|
@ -5,3 +5,4 @@ POSTGRES_PORT=5432
|
||||||
POSTGRES_DB={{ cookiecutter.project_slug }}
|
POSTGRES_DB={{ cookiecutter.project_slug }}
|
||||||
POSTGRES_USER=!!!SET POSTGRES_USER!!!
|
POSTGRES_USER=!!!SET POSTGRES_USER!!!
|
||||||
POSTGRES_PASSWORD=!!!SET POSTGRES_PASSWORD!!!
|
POSTGRES_PASSWORD=!!!SET POSTGRES_PASSWORD!!!
|
||||||
|
DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
|
||||||
|
|
|
@ -25,7 +25,7 @@ DEBUG = env.bool("DJANGO_DEBUG", False)
|
||||||
# In Windows, this must be set to your system time zone.
|
# In Windows, this must be set to your system time zone.
|
||||||
TIME_ZONE = "{{ cookiecutter.timezone }}"
|
TIME_ZONE = "{{ cookiecutter.timezone }}"
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code
|
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code
|
||||||
LANGUAGE_CODE = "en-us"
|
LANGUAGE_CODE = "es-MX"
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id
|
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
|
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
|
||||||
|
@ -89,6 +89,8 @@ THIRD_PARTY_APPS = [
|
||||||
"corsheaders",
|
"corsheaders",
|
||||||
"drf_spectacular",
|
"drf_spectacular",
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
"fontawesomefree",
|
||||||
|
"import_export",
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCAL_APPS = [
|
LOCAL_APPS = [
|
||||||
|
@ -312,6 +314,8 @@ ACCOUNT_EMAIL_REQUIRED = True
|
||||||
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
||||||
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||||
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
||||||
|
ACCOUNT_MAX_EMAIL_ADDRESSES = 1
|
||||||
|
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
||||||
ACCOUNT_LOGOUT_ON_GET = True
|
ACCOUNT_LOGOUT_ON_GET = True
|
||||||
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
# https://django-allauth.readthedocs.io/en/latest/configuration.html
|
||||||
SOCIALACCOUNT_LOGIN_ON_GET = True
|
SOCIALACCOUNT_LOGIN_ON_GET = True
|
||||||
|
|
|
@ -50,34 +50,34 @@ EMAIL_BACKEND = env(
|
||||||
INSTALLED_APPS = ["whitenoise.runserver_nostatic"] + INSTALLED_APPS # noqa F405
|
INSTALLED_APPS = ["whitenoise.runserver_nostatic"] + INSTALLED_APPS # noqa F405
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# django-debug-toolbar
|
# # django-debug-toolbar
|
||||||
# ------------------------------------------------------------------------------
|
# # ------------------------------------------------------------------------------
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites
|
# # https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites
|
||||||
INSTALLED_APPS += ["debug_toolbar"] # noqa F405
|
# INSTALLED_APPS += ["debug_toolbar"] # noqa F405
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#middleware
|
# # https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#middleware
|
||||||
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] # noqa F405
|
# MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] # noqa F405
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config
|
# # https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
# DEBUG_TOOLBAR_CONFIG = {
|
||||||
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
|
# "DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
|
||||||
"SHOW_TEMPLATE_CONTEXT": True,
|
# "SHOW_TEMPLATE_CONTEXT": True,
|
||||||
}
|
# }
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#internal-ips
|
# # https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#internal-ips
|
||||||
INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"]
|
# INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"]
|
||||||
{% if cookiecutter.use_docker == 'y' -%}
|
# {% if cookiecutter.use_docker == 'y' -%}
|
||||||
if env("USE_DOCKER") == "yes":
|
# if env("USE_DOCKER") == "yes":
|
||||||
import socket
|
# import socket
|
||||||
|
#
|
||||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
# hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||||
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
# INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
||||||
{%- if cookiecutter.frontend_pipeline == 'Gulp' %}
|
# {%- if cookiecutter.frontend_pipeline == 'Gulp' %}
|
||||||
try:
|
# try:
|
||||||
_, _, ips = socket.gethostbyname_ex("node")
|
# _, _, ips = socket.gethostbyname_ex("node")
|
||||||
INTERNAL_IPS.extend(ips)
|
# INTERNAL_IPS.extend(ips)
|
||||||
except socket.gaierror:
|
# except socket.gaierror:
|
||||||
# The node container isn't started (yet?)
|
# # The node container isn't started (yet?)
|
||||||
pass
|
# pass
|
||||||
{%- endif %}
|
# {%- endif %}
|
||||||
{%- endif %}
|
# {%- endif %}
|
||||||
|
|
||||||
# django-extensions
|
# django-extensions
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -38,6 +38,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data:Z
|
- {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data:Z
|
||||||
- {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups:z
|
- {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups:z
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.local/.postgres
|
- ./.envs/.local/.postgres
|
||||||
|
|
||||||
|
|
|
@ -44,5 +44,10 @@ django-redis==5.2.0 # https://github.com/jazzband/django-redis
|
||||||
djangorestframework==3.13.1 # https://github.com/encode/django-rest-framework
|
djangorestframework==3.13.1 # https://github.com/encode/django-rest-framework
|
||||||
django-cors-headers==3.13.0 # https://github.com/adamchainz/django-cors-headers
|
django-cors-headers==3.13.0 # https://github.com/adamchainz/django-cors-headers
|
||||||
# DRF-spectacular for api documentation
|
# DRF-spectacular for api documentation
|
||||||
drf-spectacular==0.22.1 # https://github.com/tfranzel/drf-spectacular
|
drf-spectacular==0.22.1 # https://github.com/tfranzel/drf-spectacular
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
# Project
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
fontawesomefree==6.1.1
|
||||||
|
django-import-export==2.7.1
|
||||||
|
|
|
@ -25,6 +25,7 @@ djangorestframework-stubs==1.6.0 # https://github.com/typeddjango/djangorestfra
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
sphinx==5.0.1 # https://github.com/sphinx-doc/sphinx
|
sphinx==5.0.1 # https://github.com/sphinx-doc/sphinx
|
||||||
sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
|
sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
|
||||||
|
sphinx-rtd-theme==1.0.0 # https://pypi.org/project/sphinx-rtd-theme/
|
||||||
|
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user