Skip to content

Commit fe1a973

Browse files
committed
v1.0.47 - Update Codebase, Added Charts
1 parent f9d3479 commit fe1a973

File tree

16 files changed

+49
-13
lines changed

16 files changed

+49
-13
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## [1.0.47] 2025-03-30
4+
### Changes
5+
6+
- Normalize Codebase
7+
- Added Charts
8+
- Reset Migrations
9+
310
## [1.0.46] 2025-03-30
411
### Changes
512

apps/charts/__init__.py

Whitespace-only changes.

apps/charts/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

apps/charts/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class ChartsConfig(AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'apps.charts'

apps/charts/migrations/__init__.py

Whitespace-only changes.

apps/charts/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

apps/charts/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

apps/charts/urls.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.urls import path
2+
3+
from apps.charts import views
4+
5+
urlpatterns = [
6+
path("", views.index, name="charts"),
7+
]

apps/charts/views.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from django.shortcuts import render
2+
from django.core import serializers
3+
from apps.pages.models import *
4+
5+
# Create your views here.
6+
7+
def index(request):
8+
products = serializers.serialize('json', Product.objects.all())
9+
context = {
10+
'segment': 'charts',
11+
'products': products
12+
}
13+
return render(request, 'pages/charts.html', context)

apps/dyn_dt/migrations/0001_initial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 4.2.9 on 2025-03-16 06:05
1+
# Generated by Django 4.2.9 on 2025-03-30 11:44
22

33
from django.db import migrations, models
44

apps/pages/migrations/0001_initial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 4.2.9 on 2025-03-16 06:05
1+
# Generated by Django 4.2.9 on 2025-03-30 11:44
22

33
from django.db import migrations, models
44

apps/pages/urls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55

66
urlpatterns = [
77
path('', views.index, name='index'),
8-
path('charts/', views.charts, name='charts'),
98
]

apps/pages/views.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,3 @@ def index(request):
1111
#'products' : Product.objects.all()
1212
}
1313
return render(request, "pages/index.html", context)
14-
15-
16-
def charts(request):
17-
products = serializers.serialize('json', Product.objects.all())
18-
context = {
19-
'segment': 'charts',
20-
'products': products
21-
}
22-
return render(request, 'pages/charts.html', context)

config/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
# Dynamic API
6363
"apps.dyn_api",
6464

65+
# Charts
66+
"apps.charts",
67+
6568
# Tooling API-GEN
6669
'rest_framework', # Include DRF # <-- NEW
6770
'rest_framework.authtoken', # Include DRF Auth # <-- NEW

config/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
urlpatterns = [
2121
path('', include('apps.pages.urls')),
2222
path("", include("apps.dyn_dt.urls")),
23-
path("", include("apps.dyn_api.urls")),
23+
path("", include("apps.dyn_api.urls")),
24+
path('charts/', include('apps.charts.urls')),
2425
path("", include('admin_datta.urls')),
2526
path("admin/", admin.site.urls),
2627
]

db.sqlite3

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)