feat: update game models and configure PostgreSQL

This commit is contained in:
Денис Братусев committed 2026-10-28 12:06:32 +03:00
1 parent a2cccbda59
commit 196d1e2ed7
14 files changed
+520 -8

No files matched your search

+12 -3
View File
@@ -75,9 +75,13 @@ WSGI_APPLICATION = 'config.wsgi.application'
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "skb-market",
"USER": "skb-market",
"PASSWORD": "skb-market-password",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}
@@ -122,3 +126,8 @@ STATIC_URL = 'static/'
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
import os
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
+8
View File
@@ -16,7 +16,15 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path
from django.urls import include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('apps.games.urls')),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)