Перевод на postgresql

This commit is contained in:
2022-04-20 21:29:44 +03:00
parent d9bb18bce5
commit 3f44f8fc2f
4 changed files with 20 additions and 12 deletions

View File

@@ -3,6 +3,8 @@ from pathlib import Path
from django.contrib.messages import constants as messages
from .settings_var import * # noqa:F401,F403
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -71,17 +73,6 @@ TEMPLATES = [
WSGI_APPLICATION = "wheretogo.wsgi.application"
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators

View File

@@ -0,0 +1,13 @@
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": "wheretogo",
"USER": "wheretogo",
"PASSWORD": "",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}