arthexis 0.1.8__py3-none-any.whl → 0.1.10__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.
- {arthexis-0.1.8.dist-info → arthexis-0.1.10.dist-info}/METADATA +87 -6
- arthexis-0.1.10.dist-info/RECORD +95 -0
- arthexis-0.1.10.dist-info/licenses/LICENSE +674 -0
- config/__init__.py +0 -1
- config/auth_app.py +0 -1
- config/celery.py +1 -2
- config/context_processors.py +1 -1
- config/offline.py +2 -0
- config/settings.py +352 -37
- config/urls.py +71 -6
- core/admin.py +1601 -200
- core/admin_history.py +50 -0
- core/admindocs.py +108 -1
- core/apps.py +161 -3
- core/auto_upgrade.py +57 -0
- core/backends.py +123 -7
- core/entity.py +62 -48
- core/fields.py +98 -0
- core/github_helper.py +25 -0
- core/github_issues.py +172 -0
- core/lcd_screen.py +1 -0
- core/liveupdate.py +25 -0
- core/log_paths.py +100 -0
- core/mailer.py +83 -0
- core/middleware.py +57 -0
- core/models.py +1279 -267
- core/notifications.py +11 -1
- core/public_wifi.py +227 -0
- core/reference_utils.py +97 -0
- core/release.py +27 -20
- core/sigil_builder.py +144 -0
- core/sigil_context.py +20 -0
- core/sigil_resolver.py +284 -0
- core/system.py +162 -29
- core/tasks.py +269 -27
- core/test_system_info.py +59 -1
- core/tests.py +644 -73
- core/tests_liveupdate.py +17 -0
- core/urls.py +2 -2
- core/user_data.py +425 -168
- core/views.py +627 -59
- core/widgets.py +51 -0
- core/workgroup_urls.py +7 -3
- core/workgroup_views.py +43 -6
- nodes/actions.py +0 -2
- nodes/admin.py +168 -285
- nodes/apps.py +9 -15
- nodes/backends.py +145 -0
- nodes/lcd.py +24 -10
- nodes/models.py +579 -179
- nodes/tasks.py +1 -5
- nodes/tests.py +894 -130
- nodes/utils.py +13 -2
- nodes/views.py +204 -28
- ocpp/admin.py +212 -63
- ocpp/apps.py +1 -1
- ocpp/consumers.py +642 -68
- ocpp/evcs.py +30 -10
- ocpp/models.py +452 -70
- ocpp/simulator.py +75 -11
- ocpp/store.py +288 -30
- ocpp/tasks.py +11 -7
- ocpp/test_export_import.py +8 -7
- ocpp/test_rfid.py +211 -16
- ocpp/tests.py +1576 -137
- ocpp/transactions_io.py +68 -22
- ocpp/urls.py +35 -2
- ocpp/views.py +701 -123
- pages/admin.py +173 -13
- pages/checks.py +0 -1
- pages/context_processors.py +39 -6
- pages/forms.py +131 -0
- pages/middleware.py +153 -0
- pages/models.py +37 -9
- pages/tests.py +1182 -42
- pages/urls.py +4 -0
- pages/utils.py +0 -1
- pages/views.py +844 -51
- arthexis-0.1.8.dist-info/RECORD +0 -80
- arthexis-0.1.8.dist-info/licenses/LICENSE +0 -21
- config/workgroup_app.py +0 -7
- core/checks.py +0 -29
- {arthexis-0.1.8.dist-info → arthexis-0.1.10.dist-info}/WHEEL +0 -0
- {arthexis-0.1.8.dist-info → arthexis-0.1.10.dist-info}/top_level.txt +0 -0
pages/models.py
CHANGED
|
@@ -47,10 +47,14 @@ class ModuleManager(models.Manager):
|
|
|
47
47
|
|
|
48
48
|
class Module(Entity):
|
|
49
49
|
node_role = models.ForeignKey(
|
|
50
|
-
NodeRole,
|
|
50
|
+
NodeRole,
|
|
51
|
+
on_delete=models.CASCADE,
|
|
52
|
+
related_name="modules",
|
|
51
53
|
)
|
|
52
54
|
application = models.ForeignKey(
|
|
53
|
-
Application,
|
|
55
|
+
Application,
|
|
56
|
+
on_delete=models.CASCADE,
|
|
57
|
+
related_name="modules",
|
|
54
58
|
)
|
|
55
59
|
path = models.CharField(
|
|
56
60
|
max_length=100,
|
|
@@ -127,7 +131,9 @@ class Module(Entity):
|
|
|
127
131
|
)
|
|
128
132
|
created = True
|
|
129
133
|
else:
|
|
130
|
-
_walk(
|
|
134
|
+
_walk(
|
|
135
|
+
pattern.url_patterns, prefix=f"{prefix}{str(pattern.pattern)}"
|
|
136
|
+
)
|
|
131
137
|
|
|
132
138
|
_walk(patterns)
|
|
133
139
|
|
|
@@ -141,7 +147,9 @@ class SiteBadge(Entity):
|
|
|
141
147
|
site = models.OneToOneField(Site, on_delete=models.CASCADE, related_name="badge")
|
|
142
148
|
badge_color = models.CharField(max_length=7, default="#28a745")
|
|
143
149
|
favicon = models.ImageField(upload_to="sites/favicons/", blank=True)
|
|
144
|
-
landing_override = models.ForeignKey(
|
|
150
|
+
landing_override = models.ForeignKey(
|
|
151
|
+
"Landing", null=True, blank=True, on_delete=models.SET_NULL
|
|
152
|
+
)
|
|
145
153
|
|
|
146
154
|
def __str__(self) -> str: # pragma: no cover - simple representation
|
|
147
155
|
return f"Badge for {self.site.domain}"
|
|
@@ -185,11 +193,11 @@ class Landing(Entity):
|
|
|
185
193
|
|
|
186
194
|
def save(self, *args, **kwargs):
|
|
187
195
|
if not self.pk:
|
|
188
|
-
existing =
|
|
189
|
-
module=self.module, path=self.path
|
|
190
|
-
)
|
|
191
|
-
|
|
192
|
-
|
|
196
|
+
existing = (
|
|
197
|
+
type(self).objects.filter(module=self.module, path=self.path).first()
|
|
198
|
+
)
|
|
199
|
+
if existing:
|
|
200
|
+
self.pk = existing.pk
|
|
193
201
|
super().save(*args, **kwargs)
|
|
194
202
|
|
|
195
203
|
def natural_key(self): # pragma: no cover - simple representation
|
|
@@ -198,6 +206,26 @@ class Landing(Entity):
|
|
|
198
206
|
natural_key.dependencies = ["nodes.NodeRole", "pages.Module"]
|
|
199
207
|
|
|
200
208
|
|
|
209
|
+
class ViewHistory(Entity):
|
|
210
|
+
"""Record of public site visits."""
|
|
211
|
+
|
|
212
|
+
path = models.CharField(max_length=500)
|
|
213
|
+
method = models.CharField(max_length=10)
|
|
214
|
+
status_code = models.PositiveSmallIntegerField()
|
|
215
|
+
status_text = models.CharField(max_length=100, blank=True)
|
|
216
|
+
error_message = models.TextField(blank=True)
|
|
217
|
+
view_name = models.CharField(max_length=200, blank=True)
|
|
218
|
+
visited_at = models.DateTimeField(auto_now_add=True)
|
|
219
|
+
|
|
220
|
+
class Meta:
|
|
221
|
+
ordering = ["-visited_at"]
|
|
222
|
+
verbose_name = _("View History")
|
|
223
|
+
verbose_name_plural = _("View Histories")
|
|
224
|
+
|
|
225
|
+
def __str__(self) -> str: # pragma: no cover - simple representation
|
|
226
|
+
return f"{self.method} {self.path} ({self.status_code})"
|
|
227
|
+
|
|
228
|
+
|
|
201
229
|
class Favorite(Entity):
|
|
202
230
|
user = models.ForeignKey(
|
|
203
231
|
settings.AUTH_USER_MODEL,
|