django-cfg 1.1.79__py3-none-any.whl → 1.1.80__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 CHANGED
@@ -38,7 +38,7 @@ default_app_config = "django_cfg.apps.DjangoCfgConfig"
38
38
  from typing import TYPE_CHECKING
39
39
 
40
40
  # Version information
41
- __version__ = "1.1.79"
41
+ __version__ = "1.1.80"
42
42
  __author__ = "Unrealos Team"
43
43
  __email__ = "info@unrealos.com"
44
44
  __license__ = "MIT"
django_cfg/models/drf.py CHANGED
@@ -103,8 +103,18 @@ class SpectacularConfig(BaseModel):
103
103
  # Schema Settings
104
104
  schema_path_prefix: str = Field(default="/api", description="Schema path prefix")
105
105
  serve_include_schema: bool = Field(default=False, description="Include schema in UI")
106
- component_split_request: bool = Field(default=False, description="Split request components")
107
- component_no_read_only_required: bool = Field(default=True, description="No read-only required")
106
+ schema_coerce_path_pk_suffix: bool = Field(default=True, description="Coerce path PK suffix")
107
+ schema_coerce_method_names: Dict[str, str] = Field(
108
+ default_factory=lambda: {
109
+ "retrieve": "get",
110
+ "destroy": "delete",
111
+ "partial_update": "patch",
112
+ "update": "put",
113
+ },
114
+ description="Coerce method names for stable operation IDs"
115
+ )
116
+ # component_split_request: bool = Field(default=False, description="Split request components")
117
+ # component_no_read_only_required: bool = Field(default=True, description="No read-only required")
108
118
  sort_operations: bool = Field(default=False, description="Sort operations")
109
119
 
110
120
  # UI Settings
@@ -115,13 +125,24 @@ class SpectacularConfig(BaseModel):
115
125
  default_factory=RedocUISettings, description="Redoc UI settings"
116
126
  )
117
127
 
118
- # Post-processing
128
+ # Processing hooks
119
129
  postprocessing_hooks: List[str] = Field(
120
130
  default_factory=lambda: [
121
131
  'drf_spectacular.contrib.djangorestframework_camel_case.camelize_serializer_fields'
122
132
  ],
123
133
  description="Post-processing hooks"
124
134
  )
135
+ preprocessing_hooks: List[str] = Field(
136
+ default_factory=list,
137
+ description="Pre-processing hooks"
138
+ )
139
+
140
+ # Additional stability settings
141
+ disable_errors_and_warnings: bool = Field(default=False, description="Disable errors and warnings")
142
+ operation_id_generator_class: Optional[str] = Field(
143
+ default=None,
144
+ description="Custom operation ID generator class"
145
+ )
125
146
 
126
147
  # Enum overrides
127
148
  enum_name_overrides: Dict[str, str] = Field(
@@ -140,17 +161,27 @@ class SpectacularConfig(BaseModel):
140
161
  "VERSION": self.version,
141
162
  "SERVE_INCLUDE_SCHEMA": self.serve_include_schema,
142
163
  "SCHEMA_PATH_PREFIX": self.schema_path_prefix,
143
- 'COMPONENT_SPLIT_REQUEST': self.component_split_request,
144
- 'COMPONENT_NO_READ_ONLY_REQUIRED': self.component_no_read_only_required,
164
+ # Schema stability settings
165
+ "SCHEMA_COERCE_PATH_PK_SUFFIX": self.schema_coerce_path_pk_suffix,
166
+ "SCHEMA_COERCE_METHOD_NAMES": self.schema_coerce_method_names,
167
+ 'COMPONENT_SPLIT_REQUEST': False,
168
+ 'COMPONENT_NO_READ_ONLY_REQUIRED': False,
145
169
  "SORT_OPERATIONS": self.sort_operations,
146
170
  # UI Settings
147
171
  "SWAGGER_UI_SETTINGS": self.swagger_ui_settings.to_dict(),
148
172
  "REDOC_UI_SETTINGS": self.redoc_ui_settings.to_dict(),
149
173
  # Processing
150
174
  "POSTPROCESSING_HOOKS": self.postprocessing_hooks,
175
+ "PREPROCESSING_HOOKS": self.preprocessing_hooks,
151
176
  "ENUM_NAME_OVERRIDES": self.enum_name_overrides,
177
+ # Stability settings
178
+ "DISABLE_ERRORS_AND_WARNINGS": self.disable_errors_and_warnings,
152
179
  }
153
180
 
181
+ # Add optional operation ID generator
182
+ if self.operation_id_generator_class:
183
+ settings["OPERATION_ID_GENERATOR_CLASS"] = self.operation_id_generator_class
184
+
154
185
  # Add optional fields if present
155
186
  if self.terms_of_service:
156
187
  settings["TERMS_OF_SERVICE"] = self.terms_of_service
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-cfg
3
- Version: 1.1.79
3
+ Version: 1.1.80
4
4
  Summary: 🚀 Production-ready Django configuration framework with type-safe settings, smart automation, and modern developer experience
5
5
  Project-URL: Homepage, https://github.com/markolofsen/django-cfg
6
6
  Project-URL: Documentation, https://django-cfg.readthedocs.io
@@ -46,7 +46,7 @@ Requires-Dist: django-import-export<5.0.0,>=4.3.9
46
46
  Requires-Dist: django-json-widget>=2.0.3
47
47
  Requires-Dist: django-ratelimit<5.0.0,>=4.1.0
48
48
  Requires-Dist: django-redis>=6.0.0
49
- Requires-Dist: django-revolution>=1.0.34
49
+ Requires-Dist: django-revolution>=1.0.35
50
50
  Requires-Dist: django-unfold>=0.64.0
51
51
  Requires-Dist: djangorestframework-simplejwt>=5.5.0
52
52
  Requires-Dist: djangorestframework-simplejwt[token-blacklist]>=5.5.0
@@ -1,5 +1,5 @@
1
1
  django_cfg/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- django_cfg/__init__.py,sha256=TXttkJ3xkHyfxtP_jCR0o6gDcDPRHsfs4DY8AmG0qFs,14288
2
+ django_cfg/__init__.py,sha256=ea2QCtRzqQIOkplB81Lxhn977IjzDW6L-vwrZcc5ZYU,14288
3
3
  django_cfg/apps.py,sha256=k84brkeXJI7EgKZLEpTkM9YFZofKI4PzhFOn1cl9Msc,1656
4
4
  django_cfg/exceptions.py,sha256=RTQEoU3PfR8lqqNNv5ayd_HY2yJLs3eioqUy8VM6AG4,10378
5
5
  django_cfg/integration.py,sha256=jUO-uZXLmBXy9iugqgsl_xnYA_xoH3LZg5RxZbobVrc,4988
@@ -188,7 +188,7 @@ django_cfg/models/__init__.py,sha256=du24ZdqKdvc3VNXjgufEz_6B6gxdHtlqVHG4PJWaOQM
188
188
  django_cfg/models/cache.py,sha256=Oq6VwVgWAscMM3B91sEvbCX4rXNrP4diSt68_R4XCQk,12131
189
189
  django_cfg/models/constance.py,sha256=goR5gjvXIuuBWJJgUgdwzJXMvsGtnGFp8EwEPpviUWM,9694
190
190
  django_cfg/models/database.py,sha256=rewKwvBKwzsH-NBQZqIXv2xHheoPcz4KiDdyM-qCC3Q,16902
191
- django_cfg/models/drf.py,sha256=vewPiWFCyROPcM52cDxFPQEstyH7_bJ22B8acQe0zDw,9549
191
+ django_cfg/models/drf.py,sha256=a6484RQJyc4QEvLoqMKTgT0SvcMZTv4HJx7eWj3LBSU,10871
192
192
  django_cfg/models/jwt.py,sha256=3R_dpLmVZIcH4zdtwA4qKnuCB8RZQACrgsbbgWY2q4c,9025
193
193
  django_cfg/models/limits.py,sha256=NnTvz4iwtZEKZNx1LFudkLIqOgQq4fd5NVHSlDySXes,7444
194
194
  django_cfg/models/ngrok.py,sha256=MVgcKWx0DRSW0QcwhiSx2vVwTSG49vbVrzPkZqDK-zw,3575
@@ -271,8 +271,8 @@ django_cfg/templates/emails/base_email.html,sha256=TWcvYa2IHShlF_E8jf1bWZStRO0v8
271
271
  django_cfg/utils/__init__.py,sha256=64wwXJuXytvwt8Ze_erSR2HmV07nGWJ6DV5wloRBvYE,435
272
272
  django_cfg/utils/path_resolution.py,sha256=eML-6-RIGTs5TePktIQN8nxfDUEFJ3JA0AzWBcihAbs,13894
273
273
  django_cfg/utils/smart_defaults.py,sha256=-qaoiOQ1HKDOzwK2uxoNlmrOX6l8zgGlVPgqtdj3y4g,22319
274
- django_cfg-1.1.79.dist-info/METADATA,sha256=i_3vJLi7lYNsX5J1xj8UWKXvHxBnreYkfCFXSMj3DLk,45783
275
- django_cfg-1.1.79.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
276
- django_cfg-1.1.79.dist-info/entry_points.txt,sha256=Ucmde4Z2wEzgb4AggxxZ0zaYDb9HpyE5blM3uJ0_VNg,56
277
- django_cfg-1.1.79.dist-info/licenses/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
278
- django_cfg-1.1.79.dist-info/RECORD,,
274
+ django_cfg-1.1.80.dist-info/METADATA,sha256=uHgH7ryIG1IyMn3jGpwi5JjfCAAnXtBP00VodjvKujE,45783
275
+ django_cfg-1.1.80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
276
+ django_cfg-1.1.80.dist-info/entry_points.txt,sha256=Ucmde4Z2wEzgb4AggxxZ0zaYDb9HpyE5blM3uJ0_VNg,56
277
+ django_cfg-1.1.80.dist-info/licenses/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
278
+ django_cfg-1.1.80.dist-info/RECORD,,