pulumi-django-azure 1.0.30__py3-none-any.whl → 1.0.32__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 pulumi-django-azure might be problematic. Click here for more details.
- pulumi_django_azure/context_processors.py +42 -0
- pulumi_django_azure/django_deployment.py +6 -0
- {pulumi_django_azure-1.0.30.dist-info → pulumi_django_azure-1.0.32.dist-info}/METADATA +1 -1
- {pulumi_django_azure-1.0.30.dist-info → pulumi_django_azure-1.0.32.dist-info}/RECORD +6 -5
- {pulumi_django_azure-1.0.30.dist-info → pulumi_django_azure-1.0.32.dist-info}/WHEEL +1 -1
- {pulumi_django_azure-1.0.30.dist-info → pulumi_django_azure-1.0.32.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import hashlib
|
|
2
|
+
import json
|
|
3
|
+
import os
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from django.conf import settings
|
|
7
|
+
|
|
8
|
+
_build_info_cache = None
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def add_build_info(request):
|
|
12
|
+
if settings.DEBUG:
|
|
13
|
+
# Generate SHA-1 hash from current timestamp
|
|
14
|
+
timestamp = str(datetime.now().timestamp()).encode("utf-8")
|
|
15
|
+
dev_hash = hashlib.sha1(timestamp).hexdigest()
|
|
16
|
+
return {
|
|
17
|
+
"build_info": {
|
|
18
|
+
"commit": dev_hash,
|
|
19
|
+
"date": datetime.now(),
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
global _build_info_cache
|
|
24
|
+
|
|
25
|
+
if _build_info_cache is None:
|
|
26
|
+
path = settings.BASE_DIR / "build-info.json"
|
|
27
|
+
|
|
28
|
+
if os.path.exists(path):
|
|
29
|
+
with open(path) as f:
|
|
30
|
+
build_info = json.load(f)
|
|
31
|
+
|
|
32
|
+
_build_info_cache = {
|
|
33
|
+
"build_info": {
|
|
34
|
+
"commit": build_info["commit"],
|
|
35
|
+
"date": datetime.fromisoformat(build_info["date"]),
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else:
|
|
39
|
+
# No build info available
|
|
40
|
+
_build_info_cache = {}
|
|
41
|
+
|
|
42
|
+
return _build_info_cache
|
|
@@ -333,6 +333,12 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
333
333
|
sku=sku,
|
|
334
334
|
enable_non_ssl_port=False,
|
|
335
335
|
public_network_access=azure.redis.PublicNetworkAccess.DISABLED,
|
|
336
|
+
# Disable access key authentication...
|
|
337
|
+
disable_access_key_authentication=True,
|
|
338
|
+
# ... and enable Entra ID authentication.
|
|
339
|
+
redis_configuration=azure.redis.RedisCommonPropertiesRedisConfigurationArgs(
|
|
340
|
+
aad_enabled="true",
|
|
341
|
+
),
|
|
336
342
|
)
|
|
337
343
|
|
|
338
344
|
# Create an access policy that gives us access to the cache
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
pulumi_django_azure/__init__.py,sha256=WoTHLNGnqc3dQoJtzrAJY8OVA7ReP6XFkDb9BXZGfJ8,117
|
|
2
2
|
pulumi_django_azure/azure_helper.py,sha256=eIaOoajwQuIRyt6Q3KHIA1qctLxOqwSF9yurwk2WgzY,3417
|
|
3
|
-
pulumi_django_azure/
|
|
3
|
+
pulumi_django_azure/context_processors.py,sha256=Qm2e_WBipJYMDH3clYAAaHvEDkG8au2czSQqRkS5928,1136
|
|
4
|
+
pulumi_django_azure/django_deployment.py,sha256=l3hXP8Eo5ZUjojQtDsWeBGCFoSKN76NSz7tW9d-s9FA,50964
|
|
4
5
|
pulumi_django_azure/middleware.py,sha256=Lp05G_wn9vlSueRJsnk-g2Rs9FFG155Po2MP2Cv0LDc,3348
|
|
5
6
|
pulumi_django_azure/settings.py,sha256=BTP5y6KE3oP9pY01TR1ML6GArpLhnzx-mFflrhTQ4SE,5906
|
|
6
7
|
pulumi_django_azure/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
8
|
pulumi_django_azure/management/commands/purge_cache.py,sha256=yjMoNvEPFmtuZctOKXMUacfKJLlTC9xfF-0W-IH3kF0,488
|
|
8
9
|
pulumi_django_azure/management/commands/purge_cdn.py,sha256=8iLuqjndvreTHXRp37sjpvcNltdGTpwhY9YiQokS_P0,2095
|
|
9
|
-
pulumi_django_azure-1.0.
|
|
10
|
-
pulumi_django_azure-1.0.
|
|
11
|
-
pulumi_django_azure-1.0.
|
|
12
|
-
pulumi_django_azure-1.0.
|
|
10
|
+
pulumi_django_azure-1.0.32.dist-info/METADATA,sha256=V64GcOLJ9OzFjHRM6CUIqBEaUw-llhbmRFgdDsZxZjI,9759
|
|
11
|
+
pulumi_django_azure-1.0.32.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
|
12
|
+
pulumi_django_azure-1.0.32.dist-info/top_level.txt,sha256=MNPRJhq-_G8EMCHRkjdcb_xrqzOkmKogXUGV7Ysz3g0,20
|
|
13
|
+
pulumi_django_azure-1.0.32.dist-info/RECORD,,
|
|
File without changes
|