mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-13 16:34: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 os
|
||||
|
||||
# ({{ cookiecutter.project_slug }}/config/settings/base.py - 3 = {{ cookiecutter.project_slug }}/)
|
||||
ROOT_DIR = environ.Path(__file__) - 3
|
||||
APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}')
|
||||
ROOT_DIR = (
|
||||
environ.Path(__file__) - 3
|
||||
) # ({{ 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" -%}
|
||||
REACT_APP_DIR = ROOT_DIR.path('frontend')
|
||||
{%- endif %}
|
||||
|
@ -73,13 +73,13 @@ DJANGO_APPS = [
|
|||
"django.contrib.admin",
|
||||
]
|
||||
THIRD_PARTY_APPS = [
|
||||
'crispy_forms',
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'rest_framework',
|
||||
"crispy_forms",
|
||||
"allauth",
|
||||
"allauth.account",
|
||||
"allauth.socialaccount",
|
||||
"rest_framework",
|
||||
{% if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
||||
'corsheaders',
|
||||
"corsheaders",
|
||||
{%- endif %}
|
||||
]
|
||||
LOCAL_APPS = [
|
||||
|
@ -153,9 +153,9 @@ STATIC_ROOT = str(ROOT_DIR("staticfiles"))
|
|||
STATIC_URL = "/static/"
|
||||
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
||||
STATICFILES_DIRS = [
|
||||
str(APPS_DIR.path('static')),
|
||||
str(APPS_DIR.path("static"))
|
||||
{% 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 %}
|
||||
]
|
||||
# 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
|
||||
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
'DIRS': [
|
||||
str(APPS_DIR.path('templates')),
|
||||
str(REACT_APP_DIR.path('build')),
|
||||
"DIRS": [
|
||||
str(APPS_DIR.path("templates")),
|
||||
str(REACT_APP_DIR.path("build")),
|
||||
],
|
||||
'OPTIONS': {
|
||||
"OPTIONS": {
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||
"debug": DEBUG,
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
||||
|
|
Loading…
Reference in New Issue
Block a user