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:
@@ -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
|
||||
|
||||
|
||||
@@ -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')),
|
||||
]
|
||||
Reference in New Issue
Block a user