This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2025-09-15 23:54:59 +05:00
parent 41f6699da9
commit 42ed1b04cb
69 changed files with 5614 additions and 0 deletions

0
apps/pages/__init__.py Normal file
View File

3
apps/pages/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
apps/pages/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class PagesConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "apps.pages"

View File

@@ -0,0 +1,23 @@
# Generated by Django 4.2.9 on 2025-04-06 16:19
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
('info', models.CharField(default='', max_length=100)),
('price', models.IntegerField(blank=True, null=True)),
],
),
]

View File

12
apps/pages/models.py Normal file
View File

@@ -0,0 +1,12 @@
from django.db import models
# Create your models here.
class Product(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length = 100)
info = models.CharField(max_length = 100, default = '')
price = models.IntegerField(blank=True, null=True)
def __str__(self):
return self.name

3
apps/pages/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

7
apps/pages/urls.py Normal file
View File

@@ -0,0 +1,7 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]

9
apps/pages/views.py Normal file
View File

@@ -0,0 +1,9 @@
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
# Page from the theme
return render(request, 'pages/index.html', {'segment': 'dashboard'})