arthexis 0.1.9__py3-none-any.whl → 0.1.26__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.26.dist-info/METADATA +272 -0
- arthexis-0.1.26.dist-info/RECORD +111 -0
- {arthexis-0.1.9.dist-info → arthexis-0.1.26.dist-info}/licenses/LICENSE +674 -674
- config/__init__.py +5 -5
- config/active_app.py +15 -15
- config/asgi.py +29 -29
- config/auth_app.py +7 -7
- config/celery.py +32 -25
- config/context_processors.py +67 -68
- config/horologia_app.py +7 -7
- config/loadenv.py +11 -11
- config/logging.py +59 -48
- config/middleware.py +71 -25
- config/offline.py +49 -49
- config/settings.py +676 -492
- config/settings_helpers.py +109 -0
- config/urls.py +228 -159
- config/wsgi.py +17 -17
- core/admin.py +4052 -2066
- core/admin_history.py +50 -50
- core/admindocs.py +192 -151
- core/apps.py +350 -223
- core/auto_upgrade.py +72 -0
- core/backends.py +311 -124
- core/changelog.py +403 -0
- core/entity.py +149 -133
- core/environment.py +60 -43
- core/fields.py +168 -75
- core/form_fields.py +75 -0
- core/github_helper.py +188 -25
- core/github_issues.py +183 -172
- core/github_repos.py +72 -0
- core/lcd_screen.py +78 -78
- core/liveupdate.py +25 -25
- core/log_paths.py +114 -100
- core/mailer.py +89 -83
- core/middleware.py +91 -91
- core/models.py +5041 -2195
- core/notifications.py +105 -105
- core/public_wifi.py +267 -227
- core/reference_utils.py +107 -0
- core/release.py +940 -346
- core/rfid_import_export.py +113 -0
- core/sigil_builder.py +149 -131
- core/sigil_context.py +20 -20
- core/sigil_resolver.py +250 -284
- core/system.py +1425 -230
- core/tasks.py +538 -199
- core/temp_passwords.py +181 -0
- core/test_system_info.py +202 -43
- core/tests.py +2673 -1069
- core/tests_liveupdate.py +17 -17
- core/urls.py +11 -11
- core/user_data.py +681 -495
- core/views.py +2484 -789
- core/widgets.py +213 -51
- nodes/admin.py +2236 -445
- nodes/apps.py +98 -70
- nodes/backends.py +160 -53
- nodes/dns.py +203 -0
- nodes/feature_checks.py +133 -0
- nodes/lcd.py +165 -165
- nodes/models.py +2375 -870
- nodes/reports.py +411 -0
- nodes/rfid_sync.py +210 -0
- nodes/signals.py +18 -0
- nodes/tasks.py +141 -46
- nodes/tests.py +5045 -1489
- nodes/urls.py +29 -13
- nodes/utils.py +172 -73
- nodes/views.py +1768 -304
- ocpp/admin.py +1775 -481
- ocpp/apps.py +25 -25
- ocpp/consumers.py +1843 -630
- ocpp/evcs.py +844 -928
- ocpp/evcs_discovery.py +158 -0
- ocpp/models.py +1417 -640
- ocpp/network.py +398 -0
- ocpp/reference_utils.py +42 -0
- ocpp/routing.py +11 -9
- ocpp/simulator.py +745 -368
- ocpp/status_display.py +26 -0
- ocpp/store.py +603 -403
- ocpp/tasks.py +479 -31
- ocpp/test_export_import.py +131 -130
- ocpp/test_rfid.py +1072 -540
- ocpp/tests.py +5494 -2296
- ocpp/transactions_io.py +197 -165
- ocpp/urls.py +50 -50
- ocpp/views.py +2024 -912
- pages/admin.py +1123 -396
- pages/apps.py +45 -10
- pages/checks.py +40 -40
- pages/context_processors.py +151 -85
- pages/defaults.py +13 -0
- pages/forms.py +221 -0
- pages/middleware.py +213 -153
- pages/models.py +720 -252
- pages/module_defaults.py +156 -0
- pages/site_config.py +137 -0
- pages/tasks.py +74 -0
- pages/tests.py +4009 -1389
- pages/urls.py +38 -20
- pages/utils.py +93 -12
- pages/views.py +1736 -762
- arthexis-0.1.9.dist-info/METADATA +0 -168
- arthexis-0.1.9.dist-info/RECORD +0 -92
- core/workgroup_urls.py +0 -17
- core/workgroup_views.py +0 -94
- nodes/actions.py +0 -70
- {arthexis-0.1.9.dist-info → arthexis-0.1.26.dist-info}/WHEEL +0 -0
- {arthexis-0.1.9.dist-info → arthexis-0.1.26.dist-info}/top_level.txt +0 -0
pages/urls.py
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
from django.urls import path
|
|
2
|
-
from . import views
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
app_name = "pages"
|
|
6
|
-
|
|
7
|
-
urlpatterns = [
|
|
8
|
-
path("", views.index, name="index"),
|
|
9
|
-
path(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
path(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
),
|
|
19
|
-
path("
|
|
20
|
-
|
|
1
|
+
from django.urls import path
|
|
2
|
+
from . import views
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
app_name = "pages"
|
|
6
|
+
|
|
7
|
+
urlpatterns = [
|
|
8
|
+
path("", views.index, name="index"),
|
|
9
|
+
path(
|
|
10
|
+
"read/assets/<str:source>/<path:asset>",
|
|
11
|
+
views.readme_asset,
|
|
12
|
+
name="readme-asset",
|
|
13
|
+
),
|
|
14
|
+
path("read/<path:doc>/edit/", views.readme_edit, name="readme-edit"),
|
|
15
|
+
path("read/", views.readme, name="readme"),
|
|
16
|
+
path("read/<path:doc>", views.readme, name="readme-document"),
|
|
17
|
+
path("sitemap.xml", views.sitemap, name="pages-sitemap"),
|
|
18
|
+
path("release/", views.release_admin_redirect, name="release-admin"),
|
|
19
|
+
path("client-report/", views.client_report, name="client-report"),
|
|
20
|
+
path(
|
|
21
|
+
"client-report/download/<int:report_id>/",
|
|
22
|
+
views.client_report_download,
|
|
23
|
+
name="client-report-download",
|
|
24
|
+
),
|
|
25
|
+
path("release-checklist", views.release_checklist, name="release-checklist"),
|
|
26
|
+
path("login/", views.login_view, name="login"),
|
|
27
|
+
path("authenticator/setup/", views.authenticator_setup, name="authenticator-setup"),
|
|
28
|
+
path("request-invite/", views.request_invite, name="request-invite"),
|
|
29
|
+
path(
|
|
30
|
+
"invitation/<uidb64>/<token>/",
|
|
31
|
+
views.invitation_login,
|
|
32
|
+
name="invitation-login",
|
|
33
|
+
),
|
|
34
|
+
path("man/", views.manual_list, name="manual-list"),
|
|
35
|
+
path("man/<slug:slug>/", views.manual_detail, name="manual-detail"),
|
|
36
|
+
path("man/<slug:slug>/pdf/", views.manual_pdf, name="manual-pdf"),
|
|
37
|
+
path("feedback/user-story/", views.submit_user_story, name="user-story-submit"),
|
|
38
|
+
]
|
pages/utils.py
CHANGED
|
@@ -1,12 +1,93 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from urllib.parse import urlsplit
|
|
4
|
+
|
|
5
|
+
from django.core.exceptions import DisallowedHost
|
|
6
|
+
from django.http.request import split_domain_port
|
|
7
|
+
from django.urls import path as django_path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
ORIGINAL_REFERER_SESSION_KEY = "pages:original_referer"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def landing(label=None):
|
|
14
|
+
"""Decorator to mark a view as a landing page."""
|
|
15
|
+
|
|
16
|
+
def decorator(view):
|
|
17
|
+
view.landing = True
|
|
18
|
+
view.landing_label = label or view.__name__.replace("_", " ").title()
|
|
19
|
+
return view
|
|
20
|
+
|
|
21
|
+
return decorator
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def cache_original_referer(request) -> None:
|
|
25
|
+
"""Persist the first external referer observed for the session."""
|
|
26
|
+
|
|
27
|
+
session = getattr(request, "session", None)
|
|
28
|
+
if not hasattr(session, "get"):
|
|
29
|
+
return
|
|
30
|
+
|
|
31
|
+
original = session.get(ORIGINAL_REFERER_SESSION_KEY)
|
|
32
|
+
if original:
|
|
33
|
+
request.original_referer = original
|
|
34
|
+
return
|
|
35
|
+
|
|
36
|
+
referer = (request.META.get("HTTP_REFERER") or "").strip()
|
|
37
|
+
if not referer:
|
|
38
|
+
return
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
parsed = urlsplit(referer)
|
|
42
|
+
except ValueError:
|
|
43
|
+
return
|
|
44
|
+
|
|
45
|
+
if parsed.scheme not in {"http", "https"} or not parsed.netloc:
|
|
46
|
+
return
|
|
47
|
+
|
|
48
|
+
try:
|
|
49
|
+
host = request.get_host()
|
|
50
|
+
except DisallowedHost:
|
|
51
|
+
host = ""
|
|
52
|
+
|
|
53
|
+
referer_host, _ = split_domain_port(parsed.netloc)
|
|
54
|
+
request_host, _ = split_domain_port(host)
|
|
55
|
+
|
|
56
|
+
if referer_host and request_host:
|
|
57
|
+
if referer_host.lower() == request_host.lower():
|
|
58
|
+
return
|
|
59
|
+
|
|
60
|
+
referer_value = referer[:1000]
|
|
61
|
+
session[ORIGINAL_REFERER_SESSION_KEY] = referer_value
|
|
62
|
+
request.original_referer = referer_value
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def get_original_referer(request) -> str:
|
|
66
|
+
"""Return the original external referer recorded for the session."""
|
|
67
|
+
|
|
68
|
+
if hasattr(request, "original_referer"):
|
|
69
|
+
return request.original_referer or ""
|
|
70
|
+
|
|
71
|
+
session = getattr(request, "session", None)
|
|
72
|
+
if hasattr(session, "get"):
|
|
73
|
+
referer = session.get(ORIGINAL_REFERER_SESSION_KEY)
|
|
74
|
+
if referer:
|
|
75
|
+
request.original_referer = referer
|
|
76
|
+
return referer
|
|
77
|
+
|
|
78
|
+
referer = (request.META.get("HTTP_REFERER") or "").strip()
|
|
79
|
+
if referer:
|
|
80
|
+
referer = referer[:1000]
|
|
81
|
+
request.original_referer = referer
|
|
82
|
+
return referer
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def landing_leads_supported() -> bool:
|
|
86
|
+
"""Return ``True`` when the local node supports landing lead tracking."""
|
|
87
|
+
|
|
88
|
+
from nodes.models import Node
|
|
89
|
+
|
|
90
|
+
node = Node.get_local()
|
|
91
|
+
if not node:
|
|
92
|
+
return False
|
|
93
|
+
return node.has_feature("celery-queue")
|