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/charts/__init__.py Normal file
View File

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

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

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

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class ChartsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.charts'

View File

3
apps/charts/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

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

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

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

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

13
apps/charts/views.py Normal file
View File

@@ -0,0 +1,13 @@
from django.shortcuts import render
from django.core import serializers
from apps.pages.models import *
# Create your views here.
def index(request):
products = serializers.serialize('json', Product.objects.all())
context = {
'segment': 'charts',
'products': products
}
return render(request, 'charts/index.html', context)