django-cfg 1.1.67__py3-none-any.whl → 1.1.69__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.67"
41
+ __version__ = "1.1.69"
42
42
  __author__ = "Unrealos Team"
43
43
  __email__ = "info@unrealos.com"
44
44
  __license__ = "MIT"
@@ -257,7 +257,8 @@ class SettingsGenerator:
257
257
  config.security_domains,
258
258
  config._environment,
259
259
  config.debug,
260
- config.ssl_redirect
260
+ config.ssl_redirect,
261
+ config.cors_allow_headers
261
262
  )
262
263
  settings.update(security_defaults)
263
264
 
@@ -168,7 +168,8 @@ class SmartDefaults:
168
168
  domains: List[str],
169
169
  environment: Optional[str] = None,
170
170
  debug: bool = False,
171
- ssl_redirect: Optional[bool] = None
171
+ ssl_redirect: Optional[bool] = None,
172
+ cors_allow_headers: Optional[List[str]] = None
172
173
  ) -> Dict[str, Any]:
173
174
  """
174
175
  Get security defaults based on environment and domains.
@@ -178,6 +179,7 @@ class SmartDefaults:
178
179
  environment: Current environment
179
180
  debug: Django DEBUG setting
180
181
  ssl_redirect: Force SSL redirect on/off (None = auto based on domains)
182
+ cors_allow_headers: Custom CORS allowed headers
181
183
 
182
184
  Returns:
183
185
  Security settings dictionary
@@ -192,6 +194,10 @@ class SmartDefaults:
192
194
  settings['CORS_ALLOW_ALL_ORIGINS'] = True
193
195
  settings['CORS_ALLOW_CREDENTIALS'] = True
194
196
 
197
+ # Add custom headers if provided
198
+ if cors_allow_headers:
199
+ settings['CORS_ALLOW_HEADERS'] = cors_allow_headers
200
+
195
201
  # For development, add ALL domains to CSRF trusted origins
196
202
  # This allows testing with production domains in dev environment
197
203
  csrf_trusted_origins = []
@@ -241,6 +247,10 @@ class SmartDefaults:
241
247
  settings['CORS_ALLOWED_ORIGINS'] = allowed_origins
242
248
  settings['CORS_ALLOW_CREDENTIALS'] = True
243
249
 
250
+ # Add custom headers if provided
251
+ if cors_allow_headers:
252
+ settings['CORS_ALLOW_HEADERS'] = cors_allow_headers
253
+
244
254
  # Set CSRF trusted origins for HTTPS domains
245
255
  if csrf_trusted_origins:
246
256
  settings['CSRF_TRUSTED_ORIGINS'] = csrf_trusted_origins
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-cfg
3
- Version: 1.1.67
3
+ Version: 1.1.69
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
@@ -42,6 +42,7 @@ Requires-Dist: django-constance>=4.3.2
42
42
  Requires-Dist: django-cors-headers>=4.7.0
43
43
  Requires-Dist: django-extensions>=4.1
44
44
  Requires-Dist: django-filter>=25.0
45
+ Requires-Dist: django-import-export<5.0.0,>=4.3.9
45
46
  Requires-Dist: django-json-widget>=2.0.3
46
47
  Requires-Dist: django-ratelimit<5.0.0,>=4.1.0
47
48
  Requires-Dist: django-redis>=6.0.0
@@ -1,5 +1,5 @@
1
1
  django_cfg/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- django_cfg/__init__.py,sha256=0oD3s07HXDJe1Lh77JGRkbdjvOswiB3TDppOegeq5kk,14288
2
+ django_cfg/__init__.py,sha256=3dYtCRbFyso0rXjZIHITUZiaUPWLft38tNY23NC_7TI,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=-7hvd-4ohLdzH4eufCZTOe3yTzPoQyB_HCfvsSm9AAw,5218
@@ -148,7 +148,7 @@ django_cfg/cli/commands/info.py,sha256=tLZmiZX2nEpwrcN9cUwrGKb95X7dasuoeePrqTmK2
148
148
  django_cfg/core/__init__.py,sha256=eVK57qFOok9kTeHoNEMQ1BplkUOaQ7NB9kP9eQK1vg0,358
149
149
  django_cfg/core/config.py,sha256=EO6l39BncNRnvxkWHqyGNAiP-rhoAfwtBtr_UmWLYL8,27799
150
150
  django_cfg/core/environment.py,sha256=AXNKVxcV_3_3gtlafDx3wFTnTPPMGQ9gl40vYm2w-Hg,9101
151
- django_cfg/core/generation.py,sha256=z4yDoYM-_q6RGIn4ZesLXS8frcHoiHz5oBIREcJON4U,24668
151
+ django_cfg/core/generation.py,sha256=i3c0RI4vUk3X2JZiULfoH5_H8ZjO7rOZTY83eJDfDYA,24715
152
152
  django_cfg/core/validation.py,sha256=j0q57oJEJjI6ylb3AzvsgupmvBKsUcrxpmkfKF3ZRF4,6585
153
153
  django_cfg/management/__init__.py,sha256=z8p1jlyajNUleDxRUXL3iXUI99xXWFYNtFAe5nKy1kA,43
154
154
  django_cfg/management/commands/__init__.py,sha256=z8p1jlyajNUleDxRUXL3iXUI99xXWFYNtFAe5nKy1kA,43
@@ -253,9 +253,9 @@ django_cfg/templates/admin/snippets/zones/zones_table.html,sha256=2oaiCXVof2F7Li
253
253
  django_cfg/templates/emails/base_email.html,sha256=TWcvYa2IHShlF_E8jf1bWZStRO0v8G4L_GexPxvz6XQ,8836
254
254
  django_cfg/utils/__init__.py,sha256=64wwXJuXytvwt8Ze_erSR2HmV07nGWJ6DV5wloRBvYE,435
255
255
  django_cfg/utils/path_resolution.py,sha256=eML-6-RIGTs5TePktIQN8nxfDUEFJ3JA0AzWBcihAbs,13894
256
- django_cfg/utils/smart_defaults.py,sha256=iL6_n3jGDW5812whylWAwXik0xBSYihdLp4IJ26T5eA,20547
257
- django_cfg-1.1.67.dist-info/METADATA,sha256=vCpTaHqQCl_CG0RoDY9rCre3SUoyn6u14zHkRLYZnlo,44084
258
- django_cfg-1.1.67.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
259
- django_cfg-1.1.67.dist-info/entry_points.txt,sha256=Ucmde4Z2wEzgb4AggxxZ0zaYDb9HpyE5blM3uJ0_VNg,56
260
- django_cfg-1.1.67.dist-info/licenses/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
261
- django_cfg-1.1.67.dist-info/RECORD,,
256
+ django_cfg/utils/smart_defaults.py,sha256=H0Q3dzXOok3mNV7358lZLNYOJoiX_eIay8c83ugvygk,21049
257
+ django_cfg-1.1.69.dist-info/METADATA,sha256=IHnOnOZmGgWtyTNovE1PUbPLydE07r6CrrQn9aosZiA,44134
258
+ django_cfg-1.1.69.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
259
+ django_cfg-1.1.69.dist-info/entry_points.txt,sha256=Ucmde4Z2wEzgb4AggxxZ0zaYDb9HpyE5blM3uJ0_VNg,56
260
+ django_cfg-1.1.69.dist-info/licenses/LICENSE,sha256=xHuytiUkSZCRG3N11nk1X6q1_EGQtv6aL5O9cqNRhKE,1071
261
+ django_cfg-1.1.69.dist-info/RECORD,,