pulumi-django-azure 1.0.39__tar.gz → 1.0.41__tar.gz

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 pulumi-django-azure might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pulumi-django-azure
3
- Version: 1.0.39
3
+ Version: 1.0.41
4
4
  Summary: Simply deployment of Django on Azure with Pulumi
5
5
  License-Expression: MIT
6
6
  Keywords: django,pulumi,azure
@@ -13,6 +13,7 @@ Requires-Dist: azure-identity (>=1.25.1,<2.0.0)
13
13
  Requires-Dist: azure-keyvault-secrets (>=4.10.0,<5.0.0)
14
14
  Requires-Dist: azure-mgmt-cdn (>=13.1.1,<14.0.0)
15
15
  Requires-Dist: azure-mgmt-resource (>=24.0.0,<25.0.0)
16
+ Requires-Dist: collectfasta (>=3.3.1,<4.0.0)
16
17
  Requires-Dist: django (>=5.2.7,<6.0.0)
17
18
  Requires-Dist: django-azure-communication-email (>=1.4.0,<2.0.0)
18
19
  Requires-Dist: django-environ (>=0.12.0,<0.13.0)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "pulumi-django-azure"
7
- version = "1.0.39"
7
+ version = "1.0.41"
8
8
  description = "Simply deployment of Django on Azure with Pulumi"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Maarten Ureel", email = "maarten@youreal.eu" }]
@@ -19,6 +19,7 @@ dependencies = [
19
19
  "azure-keyvault-secrets (>=4.10.0,<5.0.0)",
20
20
  "azure-mgmt-cdn (>=13.1.1,<14.0.0)",
21
21
  "azure-mgmt-resource (>=24.0.0,<25.0.0)",
22
+ "collectfasta (>=3.3.1,<4.0.0)",
22
23
  "django (>=5.2.7,<6.0.0)",
23
24
  "django-azure-communication-email (>=1.4.0,<2.0.0)",
24
25
  "django-environ (>=0.12.0,<0.13.0)",
@@ -69,6 +69,8 @@ if container_staticfiles := env("AZURE_STORAGE_CONTAINER_STATICFILES", default=N
69
69
  "azure_container": container_staticfiles,
70
70
  },
71
71
  }
72
+ COLLECTFASTA_STRATEGY = "collectfasta.strategies.azure.AzureBlobStrategy"
73
+
72
74
 
73
75
  # This setting enables password rotation in the health check middleware
74
76
  if IS_AZURE_ENVIRONMENT:
@@ -168,3 +170,26 @@ if DJANGO_TASKS and REDIS_SIDECAR:
168
170
  "BACKEND": "django_tasks.backends.rq.RQBackend",
169
171
  }
170
172
  }
173
+
174
+
175
+ def patch_django_settings_for_azure():
176
+ """
177
+ Patch the Django settings to add the required apps and middleware.
178
+ """
179
+ global INSTALLED_APPS
180
+ global MIDDLEWARE
181
+ global TEMPLATES
182
+
183
+ # Insert collectfasta at the correct position
184
+ INSTALLED_APPS.insert(INSTALLED_APPS.index("django.contrib.staticfiles"), "collectfasta")
185
+
186
+ # Add the required apps
187
+ INSTALLED_APPS.append("pulumi_django_azure")
188
+ INSTALLED_APPS.append("django_rq")
189
+ INSTALLED_APPS.append("django_tasks")
190
+
191
+ # Add the middleware
192
+ MIDDLEWARE.append("pulumi_django_azure.middleware.HealthCheckMiddleware")
193
+
194
+ # Add the template context processors
195
+ TEMPLATES[0]["OPTIONS"]["context_processors"].append("pulumi_django_azure.context_processors.add_build_info")