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:
0
home/__init__.py
Normal file
0
home/__init__.py
Normal file
3
home/admin.py
Normal file
3
home/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
5
home/apps.py
Normal file
5
home/apps.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class HomeConfig(AppConfig):
|
||||
name = 'home'
|
||||
0
home/migrations/__init__.py
Normal file
0
home/migrations/__init__.py
Normal file
3
home/models.py
Normal file
3
home/models.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
home/tests.py
Normal file
3
home/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
7
home/urls.py
Normal file
7
home/urls.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='home'),
|
||||
]
|
||||
8
home/views.py
Normal file
8
home/views.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def index(request):
|
||||
"""
|
||||
Main index page view for the SantehRay e-commerce site
|
||||
"""
|
||||
return render(request=request, template_name='home/index.html', context={})
|
||||
Reference in New Issue
Block a user