mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-14 08:54:52 +03:00
fixed issues with autopep8 adding/spaces to jinja template engine
This commit is contained in:
parent
99723ca506
commit
3b8b640d3c
|
@ -3,11 +3,11 @@ Base settings to build other settings files upon.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import environ
|
import environ
|
||||||
import os
|
|
||||||
|
|
||||||
# ({{ cookiecutter.project_slug }}/config/settings/base.py - 3 = {{ cookiecutter.project_slug }}/)
|
ROOT_DIR = (
|
||||||
ROOT_DIR = environ.Path(__file__) - 3
|
environ.Path(__file__) - 3
|
||||||
APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}')
|
) # ({{ cookiecutter.project_slug }}/config/settings/base.py - 3 = {{ cookiecutter.project_slug }}/)
|
||||||
|
APPS_DIR = ROOT_DIR.path("{{ cookiecutter.project_slug }}")
|
||||||
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
||||||
REACT_APP_DIR = ROOT_DIR.path('frontend')
|
REACT_APP_DIR = ROOT_DIR.path('frontend')
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -73,13 +73,13 @@ DJANGO_APPS = [
|
||||||
"django.contrib.admin",
|
"django.contrib.admin",
|
||||||
]
|
]
|
||||||
THIRD_PARTY_APPS = [
|
THIRD_PARTY_APPS = [
|
||||||
'crispy_forms',
|
"crispy_forms",
|
||||||
'allauth',
|
"allauth",
|
||||||
'allauth.account',
|
"allauth.account",
|
||||||
'allauth.socialaccount',
|
"allauth.socialaccount",
|
||||||
'rest_framework',
|
"rest_framework",
|
||||||
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
||||||
'corsheaders',
|
"corsheaders",
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
]
|
]
|
||||||
LOCAL_APPS = [
|
LOCAL_APPS = [
|
||||||
|
@ -153,9 +153,9 @@ STATIC_ROOT = str(ROOT_DIR("staticfiles"))
|
||||||
STATIC_URL = "/static/"
|
STATIC_URL = "/static/"
|
||||||
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
||||||
STATICFILES_DIRS = [
|
STATICFILES_DIRS = [
|
||||||
str(APPS_DIR.path('static')),
|
str(APPS_DIR.path("static"))
|
||||||
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
||||||
os.path.join(str(REACT_APP_DIR.path('build')), 'static'),
|
os.path.join(str(REACT_APP_DIR.path("build")), 'static'),
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
]
|
]
|
||||||
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
||||||
|
@ -179,11 +179,11 @@ TEMPLATES = [
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
|
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
|
||||||
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||||
'DIRS': [
|
"DIRS": [
|
||||||
str(APPS_DIR.path('templates')),
|
str(APPS_DIR.path("templates")),
|
||||||
str(REACT_APP_DIR.path('build')),
|
str(REACT_APP_DIR.path("build")),
|
||||||
],
|
],
|
||||||
'OPTIONS': {
|
"OPTIONS": {
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||||
"debug": DEBUG,
|
"debug": DEBUG,
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
# https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
||||||
|
|
Loading…
Reference in New Issue
Block a user