Skip to content

Commit 51178ce

Browse files
committed
v1.0.45 - Refactoring, Bump UI, Integrate Jazzmin
1 parent 6fe9650 commit 51178ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+89
-103
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9
1+
FROM python:3.12
22

33
# set environment variables
44
ENV PYTHONDONTWRITEBYTECODE 1
@@ -16,8 +16,5 @@ COPY . .
1616
RUN python manage.py makemigrations
1717
RUN python manage.py migrate
1818

19-
# Generate API
20-
RUN python manage.py generate-api -f
21-
2219
# gunicorn
23-
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]
20+
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "config.wsgi"]

README.md

Lines changed: 2 additions & 1 deletion
File renamed without changes.
File renamed without changes.

dyn_api/apps.py renamed to apps/dyn_api/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
class DynApiConfig(AppConfig):
99
default_auto_field = 'django.db.models.BigAutoField'
10-
name = 'dyn_api'
10+
name = 'apps.dyn_api'
File renamed without changes.
File renamed without changes.
File renamed without changes.

dyn_api/urls.py renamed to apps/dyn_api/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from django.contrib import admin
77
from django.urls import path
8-
from dyn_api import views
8+
from apps.dyn_api import views
99

1010
urlpatterns = [
1111
path('api/', views.index, name="dynamic_api"),
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

dyn_dt/apps.py renamed to apps/dyn_dt/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
class DynDtConfig(AppConfig):
44
default_auto_field = 'django.db.models.BigAutoField'
5-
name = 'dyn_dt'
5+
name = 'apps.dyn_dt'
File renamed without changes.

dyn_dt/migrations/0001_initial.py renamed to 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-01 07:16
1+
# Generated by Django 4.2.9 on 2025-03-16 06:05
22

33
from django.db import migrations, models
44

File renamed without changes.
File renamed without changes.
File renamed without changes.

dyn_dt/urls.py renamed to apps/dyn_dt/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.urls import path
2-
from dyn_dt import views
2+
from apps.dyn_dt import views
33

44
urlpatterns = [
55
path('dynamic-dt/', views.index, name="dynamic_dt"),
File renamed without changes.

dyn_dt/views.py renamed to apps/dyn_dt/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
from django.utils.safestring import mark_safe
77
from django.conf import settings
88
from django.urls import reverse
9-
from dyn_dt.models import ModelFilter, PageItems, HideShowFilter
10-
from dyn_dt.utils import user_filter
119
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
1210
from django.urls import reverse
1311
from django.views import View
1412
from django.db import models
1513
from pprint import pp
1614

15+
from apps.dyn_dt.models import ModelFilter, PageItems, HideShowFilter
16+
from apps.dyn_dt.utils import user_filter
17+
1718
from cli import *
1819

1920
# Create your views here.
File renamed without changes.

home/admin.py renamed to apps/pages/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Register your models here.
77

8-
app_models = apps.get_app_config('home').get_models()
8+
app_models = apps.get_app_config('pages').get_models()
99
for model in app_models:
1010
try:
1111

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.apps import AppConfig
22

33

4-
class HomeConfig(AppConfig):
4+
class PagesConfig(AppConfig):
55
default_auto_field = "django.db.models.BigAutoField"
6-
name = "home"
6+
name = "apps.pages"

home/migrations/0001_initial.py renamed to 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-01 07:16
1+
# Generated by Django 4.2.9 on 2025-03-16 06:05
22

33
from django.db import migrations, models
44

File renamed without changes.
File renamed without changes.
File renamed without changes.

home/urls.py renamed to apps/pages/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
from . import views
55

66
urlpatterns = [
7-
path('' , views.index, name='index'),
7+
path('', views.index, name='index'),
88
]
File renamed without changes.

build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ python manage.py collectstatic --no-input
1313
python manage.py makemigrations
1414
python manage.py migrate
1515

16-
python manage.py generate-api -f

cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
from .common import *

cli/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import os, subprocess
@@ -14,7 +14,7 @@
1414
DIR_TMPL = os.path.join( DIR_ROOT, 'templates' )
1515
DIR_STATIC = os.path.join( DIR_ROOT, 'static' )
1616

17-
DIR_DJ_CORE = 'core'
17+
DIR_DJ_CORE = 'config'
1818
DIR_DJ_HOME = 'home'
1919

2020
FILE_DJ_MANAGE_s = 'manage.py'

cli/h_ai_claude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import random, string, json, statistics, re, pprint, time

cli/h_code_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import os, ast, astor, importlib

cli/h_django.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import random, string, time, sys

cli/h_django_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
from .common import *

cli/h_django_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
from .common import *

cli/h_django_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
from .common import *

cli/h_django_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
from .common import *

cli/h_django_urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
from .common import *

cli/h_files.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,30 @@ def file_rm ( aPath ):
103103
if file_exists( aPath ):
104104
os.remove( aPath )
105105

106-
def list_files( aPath, aExt=None ):
106+
def list_files( aPath, aExcludePath, aExt=None ):
107107

108108
matches = []
109109

110110
for root, dirnames, filenames in os.walk( aPath ):
111-
111+
112+
# Exclude DIRs like ENV, migrations .. etc
113+
if any(ext in root for ext in aExcludePath):
114+
continue
115+
112116
if aExt:
113117

114118
for filename in fnmatch.filter(filenames, '*.' + aExt ):
115119

116-
#item = os.path.join(root, filename)
120+
item = os.path.join(root, filename)
117121

118-
matches.append( filename)
122+
matches.append( item )
119123
else:
120124

121125
for filename in filenames:
122126

123-
#item = os.path.join(root, filename)
127+
item = os.path.join(root, filename)
124128

125-
matches.append( filename )
129+
matches.append( item )
126130

127131
return matches
128132

cli/h_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import os

cli/h_shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import os

cli/h_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
22
"""
3-
Copyright (c) AppSeed.us
3+
Copyright (c) App-Generator.dev | AppSeed.us
44
"""
55

66
import random, string

cli/migrations/__init__.py

Whitespace-only changes.

config/__init__.py

Whitespace-only changes.

core/asgi.py renamed to config/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
from django.core.asgi import get_asgi_application
1313

14-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
1515

1616
application = get_asgi_application()

core/settings.py renamed to config/settings.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
from dotenv import load_dotenv
1616
from str2bool import str2bool
1717

18-
import dyn_dt
19-
2018
load_dotenv() # take environment variables from .env.
2119

2220
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -46,21 +44,23 @@
4644
# Application definition
4745

4846
INSTALLED_APPS = [
49-
'admin_datta.apps.AdminDattaConfig',
47+
'jazzmin',
5048
"django.contrib.admin",
49+
'admin_datta.apps.AdminDattaConfig',
5150
"django.contrib.auth",
5251
"django.contrib.contenttypes",
5352
"django.contrib.sessions",
5453
"django.contrib.messages",
5554
"django.contrib.staticfiles",
5655

57-
"home",
56+
# Serve UI pages
57+
"apps.pages",
5858

5959
# Dynamic DT
60-
"dyn_dt",
60+
"apps.dyn_dt",
6161

6262
# Dynamic API
63-
"dyn_api",
63+
"apps.dyn_api",
6464

6565
# Tooling API-GEN
6666
'rest_framework', # Include DRF # <-- NEW
@@ -78,9 +78,9 @@
7878
"django.middleware.clickjacking.XFrameOptionsMiddleware",
7979
]
8080

81-
ROOT_URLCONF = "core.urls"
81+
ROOT_URLCONF = "config.urls"
8282

83-
HOME_TEMPLATES = os.path.join(BASE_DIR, 'templates')
83+
HOME_TEMPLATES = os.path.join(BASE_DIR, 'templates')
8484

8585
TEMPLATES = [
8686
{
@@ -98,8 +98,7 @@
9898
},
9999
]
100100

101-
WSGI_APPLICATION = "core.wsgi.application"
102-
101+
WSGI_APPLICATION = "config.wsgi.application"
103102

104103
# Database
105104
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
@@ -185,14 +184,14 @@
185184
# ### DYNAMIC_DATATB Settings ###
186185
DYNAMIC_DATATB = {
187186
# SLUG -> Import_PATH
188-
'product' : "home.models.Product",
187+
'product' : "apps.pages.models.Product",
189188
}
190189
########################################
191190

192191
# Syntax: URI -> Import_PATH
193192
DYNAMIC_API = {
194193
# SLUG -> Import_PATH
195-
'product' : "home.models.Product",
194+
'product' : "apps.pages.models.Product",
196195
}
197196

198197
REST_FRAMEWORK = {

core/urls.py renamed to config/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
from rest_framework.authtoken.views import obtain_auth_token # <-- NEW
1919

2020
urlpatterns = [
21-
path('', include('home.urls')),
22-
path("admin/", admin.site.urls),
21+
path('', include('apps.pages.urls')),
22+
path("", include("apps.dyn_dt.urls")),
23+
path("", include("apps.dyn_api.urls")),
2324
path("", include('admin_datta.urls')),
24-
path("", include("dyn_dt.urls")),
25-
path("", include("dyn_api.urls")),
25+
path("admin/", admin.site.urls),
2626
]
2727

2828
# Lazy-load on routing is needed

core/wsgi.py renamed to config/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
from django.core.wsgi import get_wsgi_application
1313

14-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
1515

1616
application = get_wsgi_application()

db.sqlite3

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)