django-cfg 1.4.102__py3-none-any.whl → 1.4.103__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.

Potentially problematic release.


This version of django-cfg might be problematic. Click here for more details.

django_cfg/__init__.py CHANGED
@@ -32,7 +32,7 @@ Example:
32
32
  default_app_config = "django_cfg.apps.DjangoCfgConfig"
33
33
 
34
34
  # Version information
35
- __version__ = "1.4.102"
35
+ __version__ = "1.4.103"
36
36
  __license__ = "MIT"
37
37
 
38
38
  # Import registry for organized lazy loading
@@ -673,7 +673,11 @@ class Command(BaseCommand):
673
673
  ))
674
674
 
675
675
  # Create ZIP archive for Django static (Docker-ready)
676
- django_static_zip = base_dir / "static" / "nextjs_admin.zip"
676
+ # Use solution project's BASE_DIR from Django settings
677
+ from django.conf import settings as django_settings
678
+ solution_base_dir = django_settings.BASE_DIR
679
+
680
+ django_static_zip = nextjs_config.get_static_zip_path(solution_base_dir)
677
681
 
678
682
  try:
679
683
  # Ensure static directory exists
@@ -707,11 +711,14 @@ class Command(BaseCommand):
707
711
  # Get ZIP size
708
712
  zip_size_mb = django_static_zip.stat().st_size / (1024 * 1024)
709
713
 
714
+ # Show relative path from solution BASE_DIR
715
+ relative_zip_path = django_static_zip.relative_to(solution_base_dir)
716
+
710
717
  self.stdout.write(self.style.SUCCESS(
711
- f" ✅ Created ZIP archive: {django_static_zip.relative_to(base_dir)} ({zip_size_mb:.1f}MB)"
718
+ f" ✅ Created ZIP archive: {relative_zip_path} ({zip_size_mb:.1f}MB)"
712
719
  ))
713
720
  self.stdout.write(self.style.SUCCESS(
714
- f" 📍 ZIP location: {django_static_zip.relative_to(base_dir)}"
721
+ f" 📍 ZIP location: {django_static_zip}"
715
722
  ))
716
723
  self.stdout.write(self.style.SUCCESS(
717
724
  " ℹ️ This ZIP is used by NextJsAdminView (Tab 2: External Admin)"
@@ -729,17 +736,30 @@ class Command(BaseCommand):
729
736
  self.stdout.write(self.style.ERROR(
730
737
  f"\n❌ Next.js build failed with exit code {result.returncode}"
731
738
  ))
739
+
740
+ # Show full error output
732
741
  if result.stderr:
733
- self.stdout.write(self.style.ERROR(f" Error: {result.stderr[:500]}"))
742
+ self.stdout.write(self.style.ERROR(f"\n stderr:\n{result.stderr}"))
743
+ if result.stdout:
744
+ self.stdout.write(self.style.ERROR(f"\n stdout:\n{result.stdout}"))
745
+
746
+ # Exit on build failure
747
+ raise CommandError(
748
+ f"Next.js build failed with exit code {result.returncode}. "
749
+ "Fix the build errors and try again."
750
+ )
734
751
 
735
752
  except subprocess.TimeoutExpired:
736
753
  self.stdout.write(self.style.ERROR(
737
754
  "\n❌ Next.js build timed out (5 minutes)"
738
755
  ))
756
+ raise CommandError("Next.js build timed out after 5 minutes")
757
+
739
758
  except Exception as build_error:
740
759
  self.stdout.write(self.style.ERROR(
741
760
  f"\n❌ Build command failed: {build_error}"
742
761
  ))
762
+ raise CommandError(f"Next.js build command failed: {build_error}")
743
763
 
744
764
  except Exception as e:
745
765
  self.stdout.write(self.style.ERROR(f"\n❌ Failed to build Next.js admin: {e}"))
@@ -165,6 +165,19 @@ class NextJsAdminConfig(BaseModel):
165
165
  """Get tab title with default."""
166
166
  return self.tab_title or "Next.js Admin"
167
167
 
168
+ def get_static_zip_path(self, solution_base_dir):
169
+ """
170
+ Get path to nextjs_admin.zip for Django static serving.
171
+
172
+ Args:
173
+ solution_base_dir: Solution project BASE_DIR (from settings.BASE_DIR)
174
+
175
+ Returns:
176
+ Path: Path to nextjs_admin.zip (e.g., solution/projects/django/static/nextjs_admin.zip)
177
+ """
178
+ from pathlib import Path
179
+ return Path(solution_base_dir) / "static" / "nextjs_admin.zip"
180
+
168
181
  # =================================================================
169
182
  # Validators
170
183
  # =================================================================
django_cfg/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "django-cfg"
7
- version = "1.4.102"
7
+ version = "1.4.103"
8
8
  description = "Modern Django framework with type-safe Pydantic v2 configuration, Next.js admin integration, real-time WebSockets, and 8 enterprise apps. Replace settings.py with validated models, 90% less code. Production-ready with AI agents, auto-generated TypeScript clients, and zero-config features."
9
9
  readme = "README.md"
10
10
  keywords = [ "django", "configuration", "pydantic", "settings", "type-safety", "pydantic-settings", "django-environ", "startup-validation", "ide-autocomplete", "nextjs-admin", "react-admin", "websocket", "centrifugo", "real-time", "typescript-generation", "ai-agents", "enterprise-django", "django-settings", "type-safe-config", "modern-django",]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-cfg
3
- Version: 1.4.102
3
+ Version: 1.4.103
4
4
  Summary: Modern Django framework with type-safe Pydantic v2 configuration, Next.js admin integration, real-time WebSockets, and 8 enterprise apps. Replace settings.py with validated models, 90% less code. Production-ready with AI agents, auto-generated TypeScript clients, and zero-config features.
5
5
  Project-URL: Homepage, https://djangocfg.com
6
6
  Project-URL: Documentation, https://djangocfg.com
@@ -1,5 +1,5 @@
1
1
  django_cfg/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- django_cfg/__init__.py,sha256=cOoOOBDNJqLqEa69QzfvXJ5NAJqhLoE8KMekqdTLWWI,1621
2
+ django_cfg/__init__.py,sha256=NcoABp5CJlspxHWWGZJqyOKUZB7Ny0hs794hP123d_Y,1621
3
3
  django_cfg/apps.py,sha256=72m3uuvyqGiLx6gOfE-BD3P61jddCCERuBOYpxTX518,1605
4
4
  django_cfg/config.py,sha256=y4Z3rnYsHBE0TehpwAIPaxr---mkvyKrZGGsNwYso74,1398
5
5
  django_cfg/apps/__init__.py,sha256=JtDmEYt1OcleWM2ZaeX0LKDnRQzPOavfaXBWG4ECB5Q,26
@@ -859,7 +859,7 @@ django_cfg/modules/django_client/core/validation/rules/base.py,sha256=xVJli0eSEz
859
859
  django_cfg/modules/django_client/core/validation/rules/type_hints.py,sha256=hwjTMADillsTPruDvXZQeZMj4LVV443zxY9o0Gqgg6k,10200
860
860
  django_cfg/modules/django_client/management/__init__.py,sha256=mCTPP_bIOmqNnn0WAG2n4BuF6zwc9PTgdZr_dORfNDk,54
861
861
  django_cfg/modules/django_client/management/commands/__init__.py,sha256=CJ55pHUNYQ5h-QHUe3axeTtxzlUJv7wbEuZmGN21iCM,36
862
- django_cfg/modules/django_client/management/commands/generate_client.py,sha256=uPoHIU2-rqq0733H7Pj5fl-vNu7Oj5aZYyFqVNKlTVU,29955
862
+ django_cfg/modules/django_client/management/commands/generate_client.py,sha256=JShicezcxeUJ8_5l5HJtINbDwsdhoK_4gljyaPlfXGM,30910
863
863
  django_cfg/modules/django_client/management/commands/validate_openapi.py,sha256=IBKk7oRP3tMQzXjvZNIgQtMPk3k_mB2diNS7bkaSLz4,11011
864
864
  django_cfg/modules/django_client/spectacular/__init__.py,sha256=M8fG-odu2ltkG36aMMr0KDkCKGX676TwdrJO8vky2cI,345
865
865
  django_cfg/modules/django_client/spectacular/async_detection.py,sha256=S_pwGR7_2SIWHjZJyiu7SCfySF3Nr3P8eqjDyBSkkLs,5731
@@ -1023,7 +1023,7 @@ django_cfg/modules/nextjs_admin/apps.py,sha256=HxVUMmWTKdYpwJ00iIfWVFsBzsawsOVhE
1023
1023
  django_cfg/modules/nextjs_admin/urls.py,sha256=7n0yStm0WNchw14Rtu_mgsIA3WKQsYP9WZt3-YOUWjU,603
1024
1024
  django_cfg/modules/nextjs_admin/views.py,sha256=SELkdq6ioNqFLInDKfYyRSZRaXRtuGAVjQfE8sACQ_Q,10382
1025
1025
  django_cfg/modules/nextjs_admin/models/__init__.py,sha256=WGw9KXcYd1O9AoA_bpMoz2gLZUlRzjGmUBjjbObcUi0,100
1026
- django_cfg/modules/nextjs_admin/models/config.py,sha256=0ADqLuiywSCQfx_z9dkwjFCca3lr3F2uQffIjTr_QXw,5864
1026
+ django_cfg/modules/nextjs_admin/models/config.py,sha256=75iM81aaTlDQdhfvdlCzj6o9zD5JIK522CIVzM-GSvE,6326
1027
1027
  django_cfg/modules/nextjs_admin/templatetags/__init__.py,sha256=ChVBnJggCIY8rMhfyJFoA8k0qKo-8FtJknrk54Vx4wM,51
1028
1028
  django_cfg/modules/nextjs_admin/templatetags/nextjs_admin.py,sha256=aAekrlu3pvvx3I4uJGT3S2ie8QfF94umDBjgAF71EII,4483
1029
1029
  django_cfg/registry/__init__.py,sha256=CaiL9KwqPzXlIe5-4Qr7PQu5ZxAW1HtuDIXZ7-ktRQg,538
@@ -1085,9 +1085,9 @@ django_cfg/utils/version_check.py,sha256=WO51J2m2e-wVqWCRwbultEwu3q1lQasV67Mw2aa
1085
1085
  django_cfg/CHANGELOG.md,sha256=jtT3EprqEJkqSUh7IraP73vQ8PmKUMdRtznQsEnqDZk,2052
1086
1086
  django_cfg/CONTRIBUTING.md,sha256=DU2kyQ6PU0Z24ob7O_OqKWEYHcZmJDgzw-lQCmu6uBg,3041
1087
1087
  django_cfg/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
1088
- django_cfg/pyproject.toml,sha256=CAd9yDwAO6AKftMS1vPChOxU9JdGt-Wrx-RbfONN4KM,8573
1089
- django_cfg-1.4.102.dist-info/METADATA,sha256=zeGwi6Nm5lQaPgZtGI3YDSICPQ4r3rzefmfAwvECwH8,23734
1090
- django_cfg-1.4.102.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1091
- django_cfg-1.4.102.dist-info/entry_points.txt,sha256=Ucmde4Z2wEzgb4AggxxZ0zaYDb9HpyE5blM3uJ0_VNg,56
1092
- django_cfg-1.4.102.dist-info/licenses/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
1093
- django_cfg-1.4.102.dist-info/RECORD,,
1088
+ django_cfg/pyproject.toml,sha256=Z7stNPVSGKgzrgQe7wcp-wgZA9lz420IiQ2KoZSNcso,8573
1089
+ django_cfg-1.4.103.dist-info/METADATA,sha256=LAiU0BRYKRV1qpQVNFUSQKKBalgW4vsrSytQEoJ9T1w,23734
1090
+ django_cfg-1.4.103.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1091
+ django_cfg-1.4.103.dist-info/entry_points.txt,sha256=Ucmde4Z2wEzgb4AggxxZ0zaYDb9HpyE5blM3uJ0_VNg,56
1092
+ django_cfg-1.4.103.dist-info/licenses/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
1093
+ django_cfg-1.4.103.dist-info/RECORD,,