django-cfg 1.4.0__py3-none-any.whl → 1.4.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_cfg/__init__.py +1 -1
- django_cfg/apps/agents/examples/__init__.py +3 -0
- django_cfg/apps/agents/examples/simple_example.py +161 -0
- django_cfg/apps/knowbase/examples/__init__.py +3 -0
- django_cfg/apps/knowbase/examples/external_data_usage.py +191 -0
- django_cfg/apps/knowbase/mixins/examples/vehicle_model_example.py +199 -0
- django_cfg/apps/urls.py +1 -1
- django_cfg/core/base/config_model.py +2 -2
- django_cfg/core/builders/apps_builder.py +2 -2
- django_cfg/core/generation/integration_generators/third_party.py +3 -3
- django_cfg/modules/base.py +1 -1
- django_cfg/modules/django_currency/examples/__init__.py +3 -0
- django_cfg/modules/django_currency/examples/example_database_usage.py +144 -0
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/README.md +20 -20
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/__init__.py +2 -2
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/client.py +5 -5
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/config.py +3 -3
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/README.md +12 -12
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/__init__.py +1 -1
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/apps.py +4 -4
- django_cfg/modules/{django_cfg_rpc_client/dashboard/templates/django_cfg_rpc_dashboard → django_ipc_client/dashboard/templates/django_ipc_dashboard}/base.html +1 -1
- django_cfg/modules/{django_cfg_rpc_client/dashboard/templates/django_cfg_rpc_dashboard → django_ipc_client/dashboard/templates/django_ipc_dashboard}/dashboard.html +2 -2
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/urls.py +1 -1
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/urls_admin.py +1 -1
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/views.py +2 -2
- django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/exceptions.py +1 -1
- django_cfg/registry/modules.py +1 -1
- django_cfg/templates/admin/examples/component_class_example.html +156 -0
- django_cfg-1.4.4.dist-info/METADATA +533 -0
- {django_cfg-1.4.0.dist-info → django_cfg-1.4.4.dist-info}/RECORD +36 -28
- django_cfg-1.4.0.dist-info/METADATA +0 -920
- /django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/UNFOLD_INTEGRATION.md +0 -0
- /django_cfg/modules/{django_cfg_rpc_client → django_ipc_client}/dashboard/monitor.py +0 -0
- /django_cfg/modules/{django_cfg_rpc_client/dashboard/static/django_cfg_rpc_dashboard → django_ipc_client/dashboard/static/django_ipc_dashboard}/js/dashboard.js +0 -0
- {django_cfg-1.4.0.dist-info → django_cfg-1.4.4.dist-info}/WHEEL +0 -0
- {django_cfg-1.4.0.dist-info → django_cfg-1.4.4.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.4.0.dist-info → django_cfg-1.4.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
{% load unfold %}
|
2
|
+
|
3
|
+
<!--
|
4
|
+
Component Class Example Template
|
5
|
+
|
6
|
+
This demonstrates using Unfold's Component Class system with @register_component.
|
7
|
+
This is an ALTERNATIVE approach to the section-based architecture.
|
8
|
+
|
9
|
+
Benefits:
|
10
|
+
- Templates specify which component to use
|
11
|
+
- Components handle their own data fetching
|
12
|
+
- More self-contained and reusable
|
13
|
+
|
14
|
+
Usage:
|
15
|
+
- Add to UNFOLD settings: custom page or tab
|
16
|
+
- Components automatically fetch data when rendered
|
17
|
+
-->
|
18
|
+
|
19
|
+
<div class="space-y-8">
|
20
|
+
<!-- System Metrics using Component Class -->
|
21
|
+
<div>
|
22
|
+
<h2 class="text-xl font-semibold mb-4">System Metrics (Component Class)</h2>
|
23
|
+
|
24
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
25
|
+
<!-- Database Metric -->
|
26
|
+
{% component "unfold/components/card.html" with title="Database" component_class="SystemMetricsComponent" %}
|
27
|
+
{% if data.database %}
|
28
|
+
{% component "unfold/components/progress.html" with
|
29
|
+
value=data.database.value
|
30
|
+
title=data.database.title
|
31
|
+
description=data.database.description %}
|
32
|
+
{% endcomponent %}
|
33
|
+
{% endif %}
|
34
|
+
{% endcomponent %}
|
35
|
+
|
36
|
+
<!-- Cache Metric -->
|
37
|
+
{% component "unfold/components/card.html" with title="Cache" component_class="SystemMetricsComponent" %}
|
38
|
+
{% if data.cache %}
|
39
|
+
{% component "unfold/components/progress.html" with
|
40
|
+
value=data.cache.value
|
41
|
+
title=data.cache.title
|
42
|
+
description=data.cache.description %}
|
43
|
+
{% endcomponent %}
|
44
|
+
{% endif %}
|
45
|
+
{% endcomponent %}
|
46
|
+
|
47
|
+
<!-- Storage Metric -->
|
48
|
+
{% component "unfold/components/card.html" with title="Storage" component_class="SystemMetricsComponent" %}
|
49
|
+
{% if data.storage %}
|
50
|
+
{% component "unfold/components/progress.html" with
|
51
|
+
value=data.storage.value
|
52
|
+
title=data.storage.title
|
53
|
+
description=data.storage.description %}
|
54
|
+
{% endcomponent %}
|
55
|
+
{% endif %}
|
56
|
+
{% endcomponent %}
|
57
|
+
|
58
|
+
<!-- API Metric -->
|
59
|
+
{% component "unfold/components/card.html" with title="API" component_class="SystemMetricsComponent" %}
|
60
|
+
{% if data.api %}
|
61
|
+
{% component "unfold/components/progress.html" with
|
62
|
+
value=data.api.value
|
63
|
+
title=data.api.title
|
64
|
+
description=data.api.description %}
|
65
|
+
{% endcomponent %}
|
66
|
+
{% endif %}
|
67
|
+
{% endcomponent %}
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<!-- Recent Users using Component Class -->
|
72
|
+
<div>
|
73
|
+
<h2 class="text-xl font-semibold mb-4">Recent Users (Component Class)</h2>
|
74
|
+
|
75
|
+
{% component "unfold/components/card.html" with title="Latest Registrations" component_class="RecentUsersComponent" %}
|
76
|
+
{% if data.rows %}
|
77
|
+
{% component "unfold/components/table.html" with
|
78
|
+
table=data
|
79
|
+
striped=1
|
80
|
+
height=400 %}
|
81
|
+
{% endcomponent %}
|
82
|
+
{% else %}
|
83
|
+
<p class="text-font-subtle-light dark:text-font-subtle-dark">No users yet</p>
|
84
|
+
{% endif %}
|
85
|
+
{% endcomponent %}
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<!-- Charts using Component Class -->
|
89
|
+
<div>
|
90
|
+
<h2 class="text-xl font-semibold mb-4">Analytics (Component Class)</h2>
|
91
|
+
|
92
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
93
|
+
<!-- User Registrations Chart -->
|
94
|
+
{% component "unfold/components/card.html" with title="User Registrations" component_class="ChartsComponent" days=7 %}
|
95
|
+
{% if data.registrations %}
|
96
|
+
{% component "unfold/components/chart/line.html" with
|
97
|
+
data=data.registrations
|
98
|
+
height=300 %}
|
99
|
+
{% endcomponent %}
|
100
|
+
{% else %}
|
101
|
+
<p class="text-font-subtle-light dark:text-font-subtle-dark">No data available</p>
|
102
|
+
{% endif %}
|
103
|
+
{% endcomponent %}
|
104
|
+
|
105
|
+
<!-- User Activity Chart -->
|
106
|
+
{% component "unfold/components/card.html" with title="User Activity" component_class="ChartsComponent" days=7 %}
|
107
|
+
{% if data.activity %}
|
108
|
+
{% component "unfold/components/chart/bar.html" with
|
109
|
+
data=data.activity
|
110
|
+
height=300 %}
|
111
|
+
{% endcomponent %}
|
112
|
+
{% else %}
|
113
|
+
<p class="text-font-subtle-light dark:text-font-subtle-dark">No data available</p>
|
114
|
+
{% endif %}
|
115
|
+
{% endcomponent %}
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<!-- Activity Tracker using Component Class -->
|
120
|
+
<div>
|
121
|
+
<h2 class="text-xl font-semibold mb-4">Activity Tracker (Component Class)</h2>
|
122
|
+
|
123
|
+
{% component "unfold/components/card.html" with title="365 Day Heatmap" component_class="ActivityTrackerComponent" %}
|
124
|
+
{% if data %}
|
125
|
+
{% component "unfold/components/tracker.html" with data=data %}
|
126
|
+
{% endcomponent %}
|
127
|
+
{% else %}
|
128
|
+
<p class="text-font-subtle-light dark:text-font-subtle-dark">No activity data</p>
|
129
|
+
{% endif %}
|
130
|
+
{% endcomponent %}
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<!--
|
135
|
+
How Component Classes Work:
|
136
|
+
|
137
|
+
1. Template specifies: component_class="SystemMetricsComponent"
|
138
|
+
2. Unfold finds registered component by name
|
139
|
+
3. Component's get_context_data() is called
|
140
|
+
4. Data is fetched and returned
|
141
|
+
5. Template receives data and renders
|
142
|
+
|
143
|
+
Comparison with Section-Based Approach:
|
144
|
+
|
145
|
+
Section-Based (current):
|
146
|
+
- Section class prepares all data
|
147
|
+
- Template receives pre-processed data
|
148
|
+
- Single render call for entire section
|
149
|
+
|
150
|
+
Component Classes:
|
151
|
+
- Each component fetches its own data
|
152
|
+
- More granular, reusable components
|
153
|
+
- Multiple component renders per page
|
154
|
+
|
155
|
+
Both approaches are valid - choose based on needs!
|
156
|
+
-->
|
@@ -0,0 +1,533 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: django-cfg
|
3
|
+
Version: 1.4.4
|
4
|
+
Summary: Django AI framework with built-in agents, type-safe Pydantic v2 configuration, and 8 enterprise apps. Replace settings.py, validate at startup, 90% less code. Production-ready AI workflows for Django.
|
5
|
+
Project-URL: Homepage, https://djangocfg.com
|
6
|
+
Project-URL: Documentation, https://djangocfg.com
|
7
|
+
Project-URL: Repository, https://github.com/markolofsen/django-cfg
|
8
|
+
Project-URL: Issues, https://github.com/markolofsen/django-cfg/issues
|
9
|
+
Project-URL: Changelog, https://github.com/markolofsen/django-cfg/blob/main/CHANGELOG.md
|
10
|
+
Author-email: Django-CFG Team <info@djangocfg.com>
|
11
|
+
Maintainer-email: Django-CFG Team <info@djangocfg.com>
|
12
|
+
License: MIT
|
13
|
+
License-File: LICENSE
|
14
|
+
Keywords: ai-agents,configuration,django,django-environ,django-settings,enterprise-django,ide-autocomplete,pydantic,pydantic-settings,settings,startup-validation,type-safe-config,type-safety
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
16
|
+
Classifier: Framework :: Django
|
17
|
+
Classifier: Framework :: Django :: 5.2
|
18
|
+
Classifier: Intended Audience :: Developers
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
20
|
+
Classifier: Operating System :: OS Independent
|
21
|
+
Classifier: Programming Language :: Python
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
25
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
26
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
28
|
+
Classifier: Topic :: System :: Systems Administration
|
29
|
+
Classifier: Typing :: Typed
|
30
|
+
Requires-Python: <4.0,>=3.12
|
31
|
+
Requires-Dist: beautifulsoup4<5.0,>=4.13.0
|
32
|
+
Requires-Dist: cachetools<7.0,>=5.3.0
|
33
|
+
Requires-Dist: click<9.0,>=8.2.0
|
34
|
+
Requires-Dist: cloudflare<5.0,>=4.3.0
|
35
|
+
Requires-Dist: colorlog<7.0,>=6.9.0
|
36
|
+
Requires-Dist: coolname<3.0,>=2.2.0
|
37
|
+
Requires-Dist: dj-database-url<4.0,>=3.0.0
|
38
|
+
Requires-Dist: django-admin-rangefilter<1.0,>=0.13.0
|
39
|
+
Requires-Dist: django-constance<5.0,>=4.3.0
|
40
|
+
Requires-Dist: django-cors-headers<5.0,>=4.7.0
|
41
|
+
Requires-Dist: django-dramatiq<1.0,>=0.14.0
|
42
|
+
Requires-Dist: django-extensions<5.0,>=4.1.0
|
43
|
+
Requires-Dist: django-filter<26.0,>=25.0
|
44
|
+
Requires-Dist: django-import-export<5.0,>=4.3.0
|
45
|
+
Requires-Dist: django-json-widget<3.0,>=2.0.0
|
46
|
+
Requires-Dist: django-ratelimit<5.0.0,>=4.1.0
|
47
|
+
Requires-Dist: django-redis<7.0,>=6.0.0
|
48
|
+
Requires-Dist: django-revolution<2.0,>=1.0.43
|
49
|
+
Requires-Dist: django-tailwind[reload]<5.0.0,>=4.2.0
|
50
|
+
Requires-Dist: django-unfold<1.0,>=0.64.0
|
51
|
+
Requires-Dist: djangorestframework-simplejwt<6.0,>=5.5.0
|
52
|
+
Requires-Dist: djangorestframework-simplejwt[token-blacklist]<6.0,>=5.5.0
|
53
|
+
Requires-Dist: djangorestframework<4.0,>=3.16.0
|
54
|
+
Requires-Dist: dramatiq[redis]<2.0,>=1.18.0
|
55
|
+
Requires-Dist: drf-nested-routers<1.0,>=0.94.0
|
56
|
+
Requires-Dist: drf-spectacular-sidecar<2026.0,>=2025.8.0
|
57
|
+
Requires-Dist: drf-spectacular<1.0,>=0.28.0
|
58
|
+
Requires-Dist: hiredis<4.0,>=2.0.0
|
59
|
+
Requires-Dist: loguru<1.0,>=0.7.0
|
60
|
+
Requires-Dist: lxml<7.0,>=6.0.0
|
61
|
+
Requires-Dist: mypy<2.0.0,>=1.18.2
|
62
|
+
Requires-Dist: ngrok>=1.5.1; python_version >= '3.12'
|
63
|
+
Requires-Dist: openai<2.0,>=1.107.0
|
64
|
+
Requires-Dist: pgvector<1.0,>=0.4.0
|
65
|
+
Requires-Dist: psycopg[binary,pool]<4.0,>=3.2.0
|
66
|
+
Requires-Dist: pydantic-ai<2.0,>=1.0.10
|
67
|
+
Requires-Dist: pydantic-yaml<2.0,>=1.6.0
|
68
|
+
Requires-Dist: pydantic<3.0,>=2.11.0
|
69
|
+
Requires-Dist: pydantic[email]<3.0,>=2.11.0
|
70
|
+
Requires-Dist: pytelegrambotapi<5.0,>=4.28.0
|
71
|
+
Requires-Dist: python-json-logger<4.0,>=3.3.0
|
72
|
+
Requires-Dist: pyyaml<7.0,>=6.0
|
73
|
+
Requires-Dist: questionary<3.0,>=2.1.0
|
74
|
+
Requires-Dist: redis<7.0,>=6.4.0
|
75
|
+
Requires-Dist: requests<3.0,>=2.32.0
|
76
|
+
Requires-Dist: rich<15.0,>=14.0.0
|
77
|
+
Requires-Dist: sendgrid<7.0,>=6.12.0
|
78
|
+
Requires-Dist: tenacity<10.0.0,>=9.1.2
|
79
|
+
Requires-Dist: tiktoken<1.0,>=0.11.0
|
80
|
+
Requires-Dist: toml<0.11.0,>=0.10.2
|
81
|
+
Requires-Dist: twilio<10.0,>=9.8.0
|
82
|
+
Requires-Dist: whitenoise<7.0,>=6.8.0
|
83
|
+
Provides-Extra: dev
|
84
|
+
Requires-Dist: black<26.0,>=25.9; extra == 'dev'
|
85
|
+
Requires-Dist: build<2.0,>=1.3; extra == 'dev'
|
86
|
+
Requires-Dist: django<6.0,>=5.2; extra == 'dev'
|
87
|
+
Requires-Dist: factory-boy<4.0,>=3.3; extra == 'dev'
|
88
|
+
Requires-Dist: fakeredis<3.0,>=2.28; extra == 'dev'
|
89
|
+
Requires-Dist: flake8<8.0,>=6.0.0; extra == 'dev'
|
90
|
+
Requires-Dist: isort<7.0,>=6.0; extra == 'dev'
|
91
|
+
Requires-Dist: mkdocs-material<10.0,>=9.6; extra == 'dev'
|
92
|
+
Requires-Dist: mkdocs<2.0,>=1.6; extra == 'dev'
|
93
|
+
Requires-Dist: mkdocstrings[python]<1.0,>=0.30; extra == 'dev'
|
94
|
+
Requires-Dist: mypy<2.0,>=1.18; extra == 'dev'
|
95
|
+
Requires-Dist: pre-commit<5.0,>=4.3; extra == 'dev'
|
96
|
+
Requires-Dist: pytest-cov<8.0,>=7.0; extra == 'dev'
|
97
|
+
Requires-Dist: pytest-django<5.0,>=4.11; extra == 'dev'
|
98
|
+
Requires-Dist: pytest-mock<4.0,>=3.15; extra == 'dev'
|
99
|
+
Requires-Dist: pytest<9.0,>=8.4; extra == 'dev'
|
100
|
+
Requires-Dist: questionary<3.0,>=2.1.0; extra == 'dev'
|
101
|
+
Requires-Dist: redis<7.0,>=6.4.0; extra == 'dev'
|
102
|
+
Requires-Dist: rich<15.0,>=13.0.0; extra == 'dev'
|
103
|
+
Requires-Dist: tomlkit<1.0,>=0.13.3; extra == 'dev'
|
104
|
+
Requires-Dist: twine<7.0,>=6.2; extra == 'dev'
|
105
|
+
Provides-Extra: django52
|
106
|
+
Requires-Dist: django<6.0,>=5.2; extra == 'django52'
|
107
|
+
Provides-Extra: docs
|
108
|
+
Requires-Dist: mkdocs-material<10.0,>=9.6; extra == 'docs'
|
109
|
+
Requires-Dist: mkdocs<2.0,>=1.6; extra == 'docs'
|
110
|
+
Requires-Dist: mkdocstrings[python]<1.0,>=0.30; extra == 'docs'
|
111
|
+
Requires-Dist: pymdown-extensions<11.0,>=10.16; extra == 'docs'
|
112
|
+
Provides-Extra: full
|
113
|
+
Requires-Dist: black<26.0,>=25.9; extra == 'full'
|
114
|
+
Requires-Dist: build<2.0,>=1.3; extra == 'full'
|
115
|
+
Requires-Dist: django<6.0,>=5.2; extra == 'full'
|
116
|
+
Requires-Dist: factory-boy<4.0,>=3.3; extra == 'full'
|
117
|
+
Requires-Dist: flake8<8.0,>=6.0.0; extra == 'full'
|
118
|
+
Requires-Dist: isort<7.0,>=6.0; extra == 'full'
|
119
|
+
Requires-Dist: mkdocs-material<10.0,>=9.6; extra == 'full'
|
120
|
+
Requires-Dist: mkdocs<2.0,>=1.6; extra == 'full'
|
121
|
+
Requires-Dist: mkdocstrings[python]<1.0,>=0.30; extra == 'full'
|
122
|
+
Requires-Dist: mypy<2.0,>=1.18; extra == 'full'
|
123
|
+
Requires-Dist: pre-commit<5.0,>=4.3; extra == 'full'
|
124
|
+
Requires-Dist: pymdown-extensions<11.0,>=10.16; extra == 'full'
|
125
|
+
Requires-Dist: pytest-cov<8.0,>=7.0; extra == 'full'
|
126
|
+
Requires-Dist: pytest-django<5.0,>=4.11; extra == 'full'
|
127
|
+
Requires-Dist: pytest-mock<4.0,>=3.15; extra == 'full'
|
128
|
+
Requires-Dist: pytest-xdist<4.0,>=3.8; extra == 'full'
|
129
|
+
Requires-Dist: pytest<9.0,>=8.4; extra == 'full'
|
130
|
+
Requires-Dist: questionary<3.0,>=2.1.0; extra == 'full'
|
131
|
+
Requires-Dist: redis<7.0,>=6.4.0; extra == 'full'
|
132
|
+
Requires-Dist: rich<15.0,>=13.0.0; extra == 'full'
|
133
|
+
Requires-Dist: tomlkit<1.0,>=0.13.3; extra == 'full'
|
134
|
+
Requires-Dist: twine<7.0,>=6.2; extra == 'full'
|
135
|
+
Provides-Extra: local
|
136
|
+
Provides-Extra: tasks
|
137
|
+
Requires-Dist: redis<7.0,>=6.4.0; extra == 'tasks'
|
138
|
+
Provides-Extra: test
|
139
|
+
Requires-Dist: django<6.0,>=5.2; extra == 'test'
|
140
|
+
Requires-Dist: factory-boy<4.0,>=3.3; extra == 'test'
|
141
|
+
Requires-Dist: fakeredis<3.0,>=2.28; extra == 'test'
|
142
|
+
Requires-Dist: pytest-cov<8.0,>=7.0; extra == 'test'
|
143
|
+
Requires-Dist: pytest-django<5.0,>=4.11; extra == 'test'
|
144
|
+
Requires-Dist: pytest-mock<4.0,>=3.15; extra == 'test'
|
145
|
+
Requires-Dist: pytest-xdist<4.0,>=3.8; extra == 'test'
|
146
|
+
Requires-Dist: pytest<9.0,>=8.4; extra == 'test'
|
147
|
+
Description-Content-Type: text/markdown
|
148
|
+
|
149
|
+
# Django-CFG: Type-Safe Django Configuration Framework with AI-Ready Infrastructure
|
150
|
+
|
151
|
+
[](https://www.python.org/downloads/)
|
152
|
+
[](https://www.djangoproject.com/)
|
153
|
+
[](https://pypi.org/project/django-cfg/)
|
154
|
+
[](https://opensource.org/licenses/MIT)
|
155
|
+
[](https://pypi.org/project/django-cfg/)
|
156
|
+
[](https://github.com/markolofsen/django-cfg)
|
157
|
+
|
158
|
+
<div align="center">
|
159
|
+
<img src="https://raw.githubusercontent.com/markolofsen/django-cfg/refs/heads/main/static/django-cfg.png" alt="Django-CFG Framework" width="100%">
|
160
|
+
</div>
|
161
|
+
|
162
|
+
---
|
163
|
+
|
164
|
+
<div align="center">
|
165
|
+
|
166
|
+
### 🚀 Pydantic Django Settings: Reduce Django Configuration Code by 90%
|
167
|
+
|
168
|
+
**Type-safe Django configuration with Pydantic v2 models** • **Full IDE autocomplete** • **Startup validation** • **8 enterprise apps**
|
169
|
+
|
170
|
+
**[🤖 AI Project Generator](https://editor.djangocfg.com)** • **[🎯 Live Demo](http://demo.djangocfg.com)** • **[📚 Documentation](https://djangocfg.com/docs/getting-started/intro)**
|
171
|
+
|
172
|
+
</div>
|
173
|
+
|
174
|
+
## 🤖 AI Project Generator - Zero Setup Required
|
175
|
+
|
176
|
+
**Describe your app in plain English, get production-ready Django project in 30 seconds:**
|
177
|
+
|
178
|
+
> *"I need a SaaS app with user authentication, Stripe payments, and admin dashboard"*
|
179
|
+
|
180
|
+
**AI generates:** ✅ Type-safe config • ✅ Database models • ✅ REST API + docs • ✅ Modern UI • ✅ Deployment ready
|
181
|
+
|
182
|
+
### **[→ Try AI Editor Now](https://editor.djangocfg.com)**
|
183
|
+
|
184
|
+
---
|
185
|
+
|
186
|
+
## 🎯 Type-Safe Django Configuration with Pydantic v2
|
187
|
+
|
188
|
+
**Django-CFG replaces error-prone `settings.py` with type-safe Pydantic models** - eliminate runtime configuration errors, get full IDE autocomplete, and validate settings at startup. The only Django configuration framework with built-in AI agents and enterprise apps.
|
189
|
+
|
190
|
+
### Why Type-Safe Configuration Matters
|
191
|
+
|
192
|
+
**Traditional Django settings.py problems:**
|
193
|
+
- ❌ **Runtime errors** - typos caught in production, not at startup
|
194
|
+
- ❌ **No IDE support** - zero autocomplete, manual docs lookup
|
195
|
+
- ❌ **200+ lines** - unmaintainable configuration sprawl
|
196
|
+
- ❌ **Manual validation** - environment variables unchecked until used
|
197
|
+
|
198
|
+
**Django-CFG Pydantic solution:**
|
199
|
+
- ✅ **Compile-time validation** - catch errors before deployment
|
200
|
+
- ✅ **Full IDE autocomplete** - IntelliSense for all settings
|
201
|
+
- ✅ **30 lines of code** - 90% boilerplate reduction
|
202
|
+
- ✅ **Startup validation** - fail fast with clear error messages
|
203
|
+
|
204
|
+
### Django Configuration Comparison
|
205
|
+
|
206
|
+
| Feature | settings.py | django-environ | pydantic-settings | **Django-CFG** |
|
207
|
+
|---------|-------------|----------------|-------------------|----------------|
|
208
|
+
| **Type Safety** | ❌ Runtime only | ⚠️ Basic casting | ✅ Pydantic | ✅ **Full Pydantic v2** |
|
209
|
+
| **IDE Autocomplete** | ❌ None | ❌ None | ⚠️ Partial | ✅ **100%** |
|
210
|
+
| **Startup Validation** | ❌ No | ⚠️ Partial | ✅ Yes | ✅ **Yes + Custom validators** |
|
211
|
+
| **Django Integration** | ✅ Native | ⚠️ Partial | ❌ Manual | ✅ **Seamless** |
|
212
|
+
| **Built-in Apps** | ❌ Build yourself | ❌ None | ❌ None | ✅ **8 enterprise apps** |
|
213
|
+
| **AI-Ready** | ❌ Manual setup | ❌ None | ❌ None | ✅ **LLM + Vector DB** |
|
214
|
+
|
215
|
+
**[📚 Full comparison guide →](https://djangocfg.com/docs/getting-started/django-cfg-vs-alternatives)**
|
216
|
+
|
217
|
+
---
|
218
|
+
|
219
|
+
## 🚀 Three Ways to Start
|
220
|
+
|
221
|
+
### Option 1: AI Editor (Fastest - 30 seconds) ⚡
|
222
|
+
|
223
|
+
**Generate project with AI - no installation needed:**
|
224
|
+
|
225
|
+
1. Go to **[editor.djangocfg.com](https://editor.djangocfg.com)**
|
226
|
+
2. Describe your app in plain English
|
227
|
+
3. Download ready-to-deploy project
|
228
|
+
|
229
|
+
**[→ Generate with AI](https://editor.djangocfg.com)**
|
230
|
+
|
231
|
+
---
|
232
|
+
|
233
|
+
### Option 2: Traditional CLI
|
234
|
+
|
235
|
+
```bash
|
236
|
+
pip install django-cfg
|
237
|
+
django-cfg create-project "My SaaS App"
|
238
|
+
cd my-saas-app && python manage.py runserver
|
239
|
+
```
|
240
|
+
|
241
|
+
**What you get instantly:**
|
242
|
+
- 🎨 Modern Admin UI → `http://127.0.0.1:8000/admin/`
|
243
|
+
- 📚 API Docs → `http://127.0.0.1:8000/api/docs/`
|
244
|
+
- 🚀 Production-ready app
|
245
|
+
|
246
|
+
<div align="center">
|
247
|
+
<img src="https://raw.githubusercontent.com/markolofsen/django-cfg/refs/heads/main/static/startup.png" alt="Django-CFG Startup Screen" width="800">
|
248
|
+
<p><em>Django-CFG startup screen showing type-safe configuration validation</em></p>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
**[📚 Installation Guide →](https://djangocfg.com/docs/getting-started/installation)**
|
252
|
+
|
253
|
+
---
|
254
|
+
|
255
|
+
### Option 3: Explore Live Demo First 🎯
|
256
|
+
|
257
|
+
**See a real production Django-CFG app in action:**
|
258
|
+
|
259
|
+
### **[→ http://demo.djangocfg.com](http://demo.djangocfg.com)**
|
260
|
+
|
261
|
+
**Demo credentials:**
|
262
|
+
- **Admin:** `demo@djangocfg.com` / `demo2024`
|
263
|
+
- **User:** `user@djangocfg.com` / `user2024`
|
264
|
+
|
265
|
+
**What you'll see:** Modern admin • Auto-generated API docs • AI agents • Support system • Payments
|
266
|
+
|
267
|
+
---
|
268
|
+
|
269
|
+
## 💡 Core Features
|
270
|
+
|
271
|
+
### 🔒 Type-Safe Django Settings with Pydantic v2 Models
|
272
|
+
|
273
|
+
**Replace Django's settings.py with Pydantic v2 for complete type safety, IDE autocomplete, and startup validation.**
|
274
|
+
|
275
|
+
#### Before: Django settings.py (Runtime Errors)
|
276
|
+
|
277
|
+
```python
|
278
|
+
# settings.py - No type checking, runtime errors
|
279
|
+
import os
|
280
|
+
|
281
|
+
DEBUG = os.getenv('DEBUG', 'False') == 'True' # ❌ String comparison bug
|
282
|
+
DATABASE_PORT = os.getenv('DB_PORT', '5432') # ❌ Still a string!
|
283
|
+
|
284
|
+
DATABASES = {
|
285
|
+
'default': {
|
286
|
+
'ENGINE': 'django.db.backends.postgresql',
|
287
|
+
'NAME': os.getenv('DB_NAME'), # ❌ No validation until connection
|
288
|
+
'PORT': DATABASE_PORT, # ❌ Type mismatch in production
|
289
|
+
}
|
290
|
+
}
|
291
|
+
# ... 200+ more lines of unvalidated configuration
|
292
|
+
```
|
293
|
+
|
294
|
+
#### After: Django-CFG (Type-Safe Pydantic Configuration)
|
295
|
+
|
296
|
+
```python
|
297
|
+
# config.py - Type-safe Pydantic Django settings
|
298
|
+
from django_cfg import DjangoConfig
|
299
|
+
from django_cfg.models import DatabaseConfig
|
300
|
+
|
301
|
+
class MyConfig(DjangoConfig):
|
302
|
+
"""Production-grade type-safe Django configuration"""
|
303
|
+
|
304
|
+
project_name: str = "My SaaS App"
|
305
|
+
debug: bool = False # ✅ Pydantic validates boolean conversion
|
306
|
+
|
307
|
+
# Type-safe database configuration with startup validation
|
308
|
+
databases: dict[str, DatabaseConfig] = {
|
309
|
+
"default": DatabaseConfig(
|
310
|
+
name="${DB_NAME}", # ✅ Validated at startup
|
311
|
+
port=5432, # ✅ Type-checked integer
|
312
|
+
)
|
313
|
+
}
|
314
|
+
```
|
315
|
+
|
316
|
+
**Django Configuration Benefits:**
|
317
|
+
- ✅ **Pydantic v2 validation** - catch config errors before deployment
|
318
|
+
- ✅ **Full IDE autocomplete** - IntelliSense for all Django settings
|
319
|
+
- ✅ **90% less code** - reduce 200+ lines to 30 lines
|
320
|
+
- ✅ **Type hints everywhere** - mypy and pyright compatible
|
321
|
+
|
322
|
+
**[📚 Type-safe configuration guide →](https://djangocfg.com/docs/getting-started/configuration)**
|
323
|
+
|
324
|
+
---
|
325
|
+
|
326
|
+
### 🤖 AI Django Framework - Production-Ready AI Agents
|
327
|
+
|
328
|
+
**Django AI integration made simple** - type-safe AI agents, LLM workflow automation, and vector database built into Django.
|
329
|
+
|
330
|
+
```python
|
331
|
+
from django_cfg import DjangoConfig
|
332
|
+
|
333
|
+
class MyConfig(DjangoConfig):
|
334
|
+
# AI-powered Django development - zero setup
|
335
|
+
openai_api_key: str = "${OPENAI_API_KEY}"
|
336
|
+
anthropic_api_key: str = "${ANTHROPIC_API_KEY}"
|
337
|
+
|
338
|
+
# Enable AI Django agents (optional)
|
339
|
+
enable_agents: bool = True # AI workflow automation
|
340
|
+
enable_knowbase: bool = True # Vector database + RAG
|
341
|
+
```
|
342
|
+
|
343
|
+
**Django AI Features:**
|
344
|
+
- 🤖 **AI Agents Framework** - Type-safe Django LLM integration
|
345
|
+
- 📚 **Vector Database** - ChromaDB semantic search for Django
|
346
|
+
- 🔍 **RAG Integration** - Retrieval-augmented generation built-in
|
347
|
+
- 🎯 **Pydantic AI** - Type-safe AI input/output validation
|
348
|
+
- 🌐 **Multi-LLM** - OpenAI, Anthropic, Claude API support
|
349
|
+
|
350
|
+
**[📚 Django AI agents guide →](https://djangocfg.com/docs/ai-agents/introduction)**
|
351
|
+
|
352
|
+
---
|
353
|
+
|
354
|
+
### 📦 8 Production-Ready Enterprise Apps
|
355
|
+
|
356
|
+
**Ship features in days, not months** - everything you need is included:
|
357
|
+
|
358
|
+
- **👤 Accounts** - User management + OTP + SMS auth
|
359
|
+
- **🎫 Support** - Ticketing system + SLA tracking
|
360
|
+
- **📧 Newsletter** - Email campaigns + analytics
|
361
|
+
- **📊 Leads** - CRM + sales pipeline
|
362
|
+
- **🤖 AI Agents** - Optional workflow automation
|
363
|
+
- **📚 KnowBase** - Optional AI knowledge base + RAG
|
364
|
+
- **💳 Payments** - Multi-provider crypto/fiat payments
|
365
|
+
- **🔧 Maintenance** - Multi-site Cloudflare management
|
366
|
+
|
367
|
+
**Total time saved: 18 months of development**
|
368
|
+
|
369
|
+
**[📚 Explore all apps →](https://djangocfg.com/docs/features/built-in-apps)**
|
370
|
+
|
371
|
+
---
|
372
|
+
|
373
|
+
### 🎨 Modern API UI with Tailwind 4
|
374
|
+
|
375
|
+
**Beautiful browsable API** - 88% smaller bundle, 66% faster than old DRF UI.
|
376
|
+
|
377
|
+
- ✅ Glass morphism design
|
378
|
+
- ✅ Light/Dark/Auto themes
|
379
|
+
- ✅ Command palette (⌘K)
|
380
|
+
- ✅ 88% smaller bundle (278KB → 33KB)
|
381
|
+
|
382
|
+
**[📚 See API Theme →](https://djangocfg.com/docs/features/api-generation)**
|
383
|
+
|
384
|
+
---
|
385
|
+
|
386
|
+
### 🔄 Smart Multi-Database Routing
|
387
|
+
|
388
|
+
**Zero-config database routing** with automatic sharding:
|
389
|
+
|
390
|
+
```python
|
391
|
+
databases: dict[str, DatabaseConfig] = {
|
392
|
+
"analytics": DatabaseConfig(
|
393
|
+
name="${ANALYTICS_DB}",
|
394
|
+
routing_apps=["analytics", "reports"], # Auto-route!
|
395
|
+
),
|
396
|
+
}
|
397
|
+
```
|
398
|
+
|
399
|
+
✅ Auto-routes read/write • ✅ Cross-DB transactions • ✅ Connection pooling
|
400
|
+
|
401
|
+
**[📚 Multi-DB Guide →](https://djangocfg.com/docs/fundamentals/database)**
|
402
|
+
|
403
|
+
---
|
404
|
+
|
405
|
+
## ⚙️ Complete Configuration Example
|
406
|
+
|
407
|
+
**All available apps and integrations in one DjangoConfig:**
|
408
|
+
|
409
|
+
```python
|
410
|
+
from django_cfg import DjangoConfig
|
411
|
+
from django_cfg.models import DatabaseConfig, CacheConfig
|
412
|
+
|
413
|
+
class ProductionConfig(DjangoConfig):
|
414
|
+
# Project settings
|
415
|
+
project_name: str = "My Enterprise App"
|
416
|
+
secret_key: str = "${SECRET_KEY}"
|
417
|
+
debug: bool = False
|
418
|
+
|
419
|
+
# 8 Built-in Enterprise Apps (enable as needed)
|
420
|
+
enable_accounts: bool = True # 👤 User management + OTP + SMS
|
421
|
+
enable_support: bool = True # 🎫 Ticketing + SLA tracking
|
422
|
+
enable_newsletter: bool = True # 📧 Email campaigns
|
423
|
+
enable_leads: bool = True # 📊 CRM + sales pipeline
|
424
|
+
enable_agents: bool = True # 🤖 AI workflow automation
|
425
|
+
enable_knowbase: bool = True # 📚 AI knowledge base + RAG
|
426
|
+
enable_payments: bool = True # 💳 Crypto/fiat payments
|
427
|
+
enable_maintenance: bool = True # 🔧 Cloudflare management
|
428
|
+
|
429
|
+
# Infrastructure
|
430
|
+
databases: dict[str, DatabaseConfig] = {
|
431
|
+
"default": DatabaseConfig(name="${DB_NAME}"),
|
432
|
+
}
|
433
|
+
caches: dict[str, CacheConfig] = {
|
434
|
+
"default": CacheConfig(backend="redis"),
|
435
|
+
}
|
436
|
+
|
437
|
+
# AI Providers (optional)
|
438
|
+
openai_api_key: str = "${OPENAI_API_KEY}"
|
439
|
+
anthropic_api_key: str = "${ANTHROPIC_API_KEY}"
|
440
|
+
|
441
|
+
# Third-party Integrations
|
442
|
+
twilio_account_sid: str = "${TWILIO_ACCOUNT_SID}" # SMS
|
443
|
+
stripe_api_key: str = "${STRIPE_API_KEY}" # Payments
|
444
|
+
cloudflare_api_token: str = "${CF_API_TOKEN}" # CDN/DNS
|
445
|
+
```
|
446
|
+
|
447
|
+
**[📚 Full configuration reference →](https://djangocfg.com/docs/getting-started/configuration)**
|
448
|
+
|
449
|
+
---
|
450
|
+
|
451
|
+
## 📊 Django Configuration Framework Comparison
|
452
|
+
|
453
|
+
**Django-CFG vs Traditional Django, DRF, FastAPI, and django-environ:**
|
454
|
+
|
455
|
+
| Feature | Django settings.py | django-environ | DRF | FastAPI | **Django-CFG** |
|
456
|
+
|---------|-------------------|----------------|-----|---------|----------------|
|
457
|
+
| **Type-Safe Config** | ❌ Runtime | ⚠️ Basic | ❌ Manual | ✅ Pydantic | ✅ **Full Pydantic v2** |
|
458
|
+
| **IDE Autocomplete** | ❌ None | ❌ None | ❌ Manual | ⚠️ Partial | ✅ **100% IntelliSense** |
|
459
|
+
| **Startup Validation** | ❌ No | ⚠️ Partial | ❌ No | ✅ Yes | ✅ **Pydantic + Custom** |
|
460
|
+
| **Django Integration** | ✅ Native | ✅ Native | ✅ Native | ❌ Manual | ✅ **Seamless** |
|
461
|
+
| **Admin UI** | 🟡 Basic | 🟡 Basic | 🟡 Basic | ❌ None | ✅ **Modern Unfold** |
|
462
|
+
| **API Docs** | ❌ Manual | ❌ Manual | 🟡 Basic | ✅ Auto | ✅ **OpenAPI + Swagger** |
|
463
|
+
| **AI Agents Built-in** | ❌ Manual | ❌ None | ❌ Manual | ❌ Manual | ✅ **LLM Framework** |
|
464
|
+
| **Setup Time** | 🟡 Weeks | 🟡 Hours | 🟡 Weeks | 🟡 Days | ✅ **30 seconds** |
|
465
|
+
| **Enterprise Apps** | ❌ Build all | ❌ None | ❌ Build all | ❌ Build all | ✅ **8 included** |
|
466
|
+
| **Configuration Lines** | ⚠️ 200+ | ⚠️ 150+ | ⚠️ 200+ | ⚠️ 100+ | ✅ **30 lines** |
|
467
|
+
|
468
|
+
**Legend:** ✅ Excellent | 🟡 Requires Work | ⚠️ Partial | ❌ Not Available
|
469
|
+
|
470
|
+
**[📚 Django-CFG vs django-environ detailed comparison →](https://djangocfg.com/docs/getting-started/django-cfg-vs-alternatives)**
|
471
|
+
|
472
|
+
---
|
473
|
+
|
474
|
+
## 📚 Documentation
|
475
|
+
|
476
|
+
### 🚀 Getting Started
|
477
|
+
- **[Installation](https://djangocfg.com/docs/getting-started/installation)** - Quick setup guide
|
478
|
+
- **[First Project](https://djangocfg.com/docs/getting-started/first-project)** - Create your first app
|
479
|
+
- **[Configuration](https://djangocfg.com/docs/getting-started/configuration)** - Type-safe config guide
|
480
|
+
- **[Why Django-CFG?](https://djangocfg.com/docs/getting-started/why-django-cfg)** - Full comparison
|
481
|
+
|
482
|
+
### 🏗️ Core Features
|
483
|
+
- **[Built-in Apps](https://djangocfg.com/docs/features/built-in-apps)** - 8 enterprise apps
|
484
|
+
- **[API Generation](https://djangocfg.com/docs/features/api-generation)** - Auto OpenAPI docs
|
485
|
+
- **[Database](https://djangocfg.com/docs/fundamentals/database)** - Multi-DB routing
|
486
|
+
- **[Integrations](https://djangocfg.com/docs/features/integrations)** - Third-party services
|
487
|
+
|
488
|
+
### 🤖 AI Integration (Optional)
|
489
|
+
- **[AI Agents](https://djangocfg.com/docs/ai-agents/introduction)** - Workflow automation
|
490
|
+
- **[Creating Agents](https://djangocfg.com/docs/ai-agents/creating-agents)** - Build custom agents
|
491
|
+
- **[Django Integration](https://djangocfg.com/docs/ai-agents/django-integration)** - Connect to your app
|
492
|
+
|
493
|
+
### 🚀 Deployment
|
494
|
+
- **[Production Config](https://djangocfg.com/docs/deployment)** - Production best practices
|
495
|
+
- **[CLI Commands](https://djangocfg.com/docs/cli)** - 50+ management commands
|
496
|
+
|
497
|
+
---
|
498
|
+
|
499
|
+
## 🤝 Community & Support
|
500
|
+
|
501
|
+
### Resources
|
502
|
+
- 🌐 **[djangocfg.com](https://djangocfg.com/)** - Official website & documentation
|
503
|
+
- 🐙 **[GitHub](https://github.com/markolofsen/django-cfg)** - Source code & issues
|
504
|
+
- 💬 **[Discussions](https://github.com/markolofsen/django-cfg/discussions)** - Community support
|
505
|
+
|
506
|
+
### Links
|
507
|
+
- **[🚀 AI Project Generator](https://editor.djangocfg.com)** - Generate projects with AI
|
508
|
+
- **[🎯 Live Demo](http://demo.djangocfg.com)** - See it in action
|
509
|
+
- **[📦 PyPI](https://pypi.org/project/django-cfg/)** - Package repository
|
510
|
+
|
511
|
+
---
|
512
|
+
|
513
|
+
## 📄 License
|
514
|
+
|
515
|
+
**MIT License** - Free for commercial use
|
516
|
+
|
517
|
+
---
|
518
|
+
|
519
|
+
**Made with ❤️ by the Django-CFG Team**
|
520
|
+
|
521
|
+
---
|
522
|
+
|
523
|
+
<div align="center">
|
524
|
+
|
525
|
+
**Django AI Framework** • **Type-Safe Configuration** • **Pydantic Settings** • **Enterprise Apps**
|
526
|
+
|
527
|
+
Django-CFG is the AI-first Django framework for production-ready AI agents, type-safe Pydantic v2 configuration, and enterprise development. Replace settings.py with validated models, build AI workflows with Django ORM integration, and ship faster with 8 built-in apps. Perfect for Django LLM integration, AI-powered Django development, scalable Django architecture, and reducing Django boilerplate.
|
528
|
+
|
529
|
+
---
|
530
|
+
|
531
|
+
**Get Started:** **[Documentation](https://djangocfg.com/docs/getting-started/intro)** • **[AI Project Generator](https://editor.djangocfg.com)** • **[Live Demo](http://demo.djangocfg.com)**
|
532
|
+
|
533
|
+
</div>
|