Перешел на структуру шаблонов
All checks were successful
Auto-Deploy-Shop / deploy (push) Successful in 7s

This commit is contained in:
2026-01-25 22:12:30 +03:00
parent ac999ca6bc
commit b68837a2b7
12 changed files with 186 additions and 43 deletions

View File

@@ -55,7 +55,9 @@ ROOT_URLCONF = 'core.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR, 'templates'),
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [

View File

@@ -18,9 +18,12 @@ from django.conf import settings
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static # <--- Добавьте эту строку
from . import views
urlpatterns = [
path('admin/', admin.site.urls),
path('home/', views.home, name='home'),
path('about/', views.about, name='about'),
path('', include('products.urls')), # Главная страница теперь ведет в products
]

8
core/views.py Normal file
View File

@@ -0,0 +1,8 @@
# core/views.py
from django.shortcuts import render
def home(request):
return render(request, 'home.html')
def about(request):
return render(request, 'about.html')