feat: добавить home app и базовую структуру шаблонов

- Создано Django app 'home' с view, urls, models
- Добавлены шаблоны: base layout, header/footer fragments, index page
- Настроены STATICFILES_DIRS и TEMPLATES в settings.py
- Подключены URLS всех apps (home, items, orders, users)
- Добавлены статические файлы (CSS, изображения)
This commit is contained in:
2026-03-23 19:00:17 +01:00
parent 7c7060b56d
commit 1eff7c6227
31 changed files with 1188 additions and 3 deletions

View File

@@ -54,7 +54,9 @@ ROOT_URLCONF = 'santehray.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
BASE_DIR / 'templates',
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -115,6 +117,11 @@ USE_TZ = True
STATIC_URL = 'static/'
# Additional locations of static files
STATICFILES_DIRS = [
BASE_DIR / 'static',
]
# Default primary key field type
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field

View File

@@ -15,8 +15,12 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('', include('home.urls')),
path('admin/', admin.site.urls),
]
path('items/', include('items.urls')),
path('orders/', include('orders.urls')),
path('users/', include('users.urls')),
]