arthexis 0.1.11__py3-none-any.whl → 0.1.13__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 arthexis might be problematic. Click here for more details.

Files changed (50) hide show
  1. {arthexis-0.1.11.dist-info → arthexis-0.1.13.dist-info}/METADATA +2 -2
  2. {arthexis-0.1.11.dist-info → arthexis-0.1.13.dist-info}/RECORD +50 -44
  3. config/asgi.py +15 -1
  4. config/celery.py +8 -1
  5. config/settings.py +49 -78
  6. config/settings_helpers.py +109 -0
  7. core/admin.py +293 -78
  8. core/apps.py +21 -0
  9. core/auto_upgrade.py +2 -2
  10. core/form_fields.py +75 -0
  11. core/models.py +203 -47
  12. core/reference_utils.py +1 -1
  13. core/release.py +42 -20
  14. core/system.py +6 -3
  15. core/tasks.py +92 -40
  16. core/tests.py +75 -1
  17. core/views.py +178 -29
  18. core/widgets.py +43 -0
  19. nodes/admin.py +583 -10
  20. nodes/apps.py +15 -0
  21. nodes/feature_checks.py +133 -0
  22. nodes/models.py +287 -49
  23. nodes/reports.py +411 -0
  24. nodes/tests.py +990 -42
  25. nodes/urls.py +1 -0
  26. nodes/utils.py +32 -0
  27. nodes/views.py +173 -5
  28. ocpp/admin.py +424 -17
  29. ocpp/consumers.py +630 -15
  30. ocpp/evcs.py +7 -94
  31. ocpp/evcs_discovery.py +158 -0
  32. ocpp/models.py +236 -4
  33. ocpp/routing.py +4 -2
  34. ocpp/simulator.py +346 -26
  35. ocpp/status_display.py +26 -0
  36. ocpp/store.py +110 -2
  37. ocpp/tests.py +1425 -33
  38. ocpp/transactions_io.py +27 -3
  39. ocpp/views.py +344 -38
  40. pages/admin.py +138 -3
  41. pages/context_processors.py +15 -1
  42. pages/defaults.py +1 -2
  43. pages/forms.py +67 -0
  44. pages/models.py +136 -1
  45. pages/tests.py +379 -4
  46. pages/urls.py +1 -0
  47. pages/views.py +64 -7
  48. {arthexis-0.1.11.dist-info → arthexis-0.1.13.dist-info}/WHEEL +0 -0
  49. {arthexis-0.1.11.dist-info → arthexis-0.1.13.dist-info}/licenses/LICENSE +0 -0
  50. {arthexis-0.1.11.dist-info → arthexis-0.1.13.dist-info}/top_level.txt +0 -0
core/widgets.py CHANGED
@@ -1,4 +1,5 @@
1
1
  from django import forms
2
+ from django.forms.widgets import ClearableFileInput
2
3
  import json
3
4
 
4
5
 
@@ -49,3 +50,45 @@ class OdooProductWidget(forms.Select):
49
50
  return json.loads(raw)
50
51
  except Exception:
51
52
  return {}
53
+
54
+
55
+ class AdminBase64FileWidget(ClearableFileInput):
56
+ """Clearable file input that exposes base64 data for downloads."""
57
+
58
+ template_name = "widgets/admin_base64_file.html"
59
+
60
+ def __init__(
61
+ self,
62
+ *,
63
+ download_name: str | None = None,
64
+ content_type: str = "application/octet-stream",
65
+ **kwargs,
66
+ ) -> None:
67
+ self.download_name = download_name
68
+ self.content_type = content_type
69
+ super().__init__(**kwargs)
70
+
71
+ def is_initial(self, value):
72
+ if isinstance(value, str):
73
+ return bool(value)
74
+ return super().is_initial(value)
75
+
76
+ def format_value(self, value):
77
+ if isinstance(value, str):
78
+ return value
79
+ return super().format_value(value)
80
+
81
+ def get_context(self, name, value, attrs):
82
+ if isinstance(value, str):
83
+ base64_value = value.strip()
84
+ rendered_value = None
85
+ else:
86
+ base64_value = None
87
+ rendered_value = value
88
+ context = super().get_context(name, rendered_value, attrs)
89
+ widget_context = context["widget"]
90
+ widget_context["is_initial"] = bool(base64_value)
91
+ widget_context["base64_value"] = base64_value
92
+ widget_context["download_name"] = self.download_name or f"{name}.bin"
93
+ widget_context["content_type"] = self.content_type
94
+ return context