Skip to content

Commit

Permalink
Done2
Browse files Browse the repository at this point in the history
  • Loading branch information
antonver committed Aug 4, 2024
1 parent a6383a8 commit eda7e05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
32 changes: 14 additions & 18 deletions taxi_service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""

import os
from pathlib import Path

Expand All @@ -20,9 +21,7 @@
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = (
"django-insecure-8ovil3xu6=eaoqd#-#&ricv159p0pypoh5_lgm*)-dfcjqe=yc"
)
SECRET_KEY = "django-insecure-8ovil3xu6=eaoqd#-#&ricv159p0pypoh5_lgm*)-dfcjqe=yc"

# SECURITY WARNING: don"t run with debug turned on in production!
DEBUG = True
Expand All @@ -44,13 +43,13 @@
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"debug_toolbar.middleware.DebugToolbarMiddleware",
]

Expand All @@ -59,7 +58,7 @@
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, 'templates')],
"DIRS": [os.path.join(BASE_DIR, "templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
Expand Down Expand Up @@ -95,16 +94,13 @@
"UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation."
"MinimumLengthValidator",
"NAME": "django.contrib.auth.password_validation." "MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation."
"CommonPasswordValidator",
"NAME": "django.contrib.auth.password_validation." "CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation."
"NumericPasswordValidator",
"NAME": "django.contrib.auth.password_validation." "NumericPasswordValidator",
},
]

Expand Down Expand Up @@ -140,4 +136,4 @@
# ...
"127.0.0.1",
# ...
]
]
6 changes: 4 additions & 2 deletions taxi_service/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
from django.urls import path, include
from debug_toolbar.toolbar import debug_toolbar_urls

urlpatterns = [
urlpatterns = ([
path("admin/", admin.site.urls),
path("", include("taxi.urls", namespace="taxi")),
path("accounts/", include("django.contrib.auth.urls")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + debug_toolbar_urls()
] + static(settings.STATIC_URL,
document_root=settings.STATIC_ROOT)
+ debug_toolbar_urls())

0 comments on commit eda7e05

Please sign in to comment.