2026-07-03 11:27:45 +08:00
|
|
|
from allauth.account.views import LoginView, LogoutView, SignupView
|
|
|
|
|
from django.urls import path
|
|
|
|
|
|
2026-07-03 14:00:00 +08:00
|
|
|
from .views import (
|
|
|
|
|
ApiKeyDeleteView,
|
|
|
|
|
ApiKeyListCreateView,
|
|
|
|
|
DashboardView,
|
2026-07-21 10:06:51 +08:00
|
|
|
DeviceCredentialListView,
|
|
|
|
|
DeviceCredentialRevokeView,
|
2026-07-06 23:18:08 +08:00
|
|
|
HomeView,
|
2026-07-04 10:14:16 +08:00
|
|
|
ModelCatalogView,
|
2026-07-21 10:06:51 +08:00
|
|
|
MigrationConfirmView,
|
2026-07-03 14:49:45 +08:00
|
|
|
RechargePageView,
|
2026-07-03 14:00:00 +08:00
|
|
|
RechargeRecordListView,
|
|
|
|
|
UsageRecordListView,
|
|
|
|
|
)
|
2026-07-03 11:27:45 +08:00
|
|
|
|
|
|
|
|
urlpatterns = [
|
2026-07-06 23:18:08 +08:00
|
|
|
path("", HomeView.as_view(), name="portal-home"),
|
2026-07-03 11:27:45 +08:00
|
|
|
path("signup", SignupView.as_view(), name="portal-signup"),
|
|
|
|
|
path("login", LoginView.as_view(), name="portal-login"),
|
|
|
|
|
path("logout", LogoutView.as_view(), name="portal-logout"),
|
|
|
|
|
path("dashboard", DashboardView.as_view(), name="portal-dashboard"),
|
2026-07-03 11:51:46 +08:00
|
|
|
path("apikeys", ApiKeyListCreateView.as_view(), name="portal-apikeys"),
|
|
|
|
|
path("apikeys/<int:pk>/delete", ApiKeyDeleteView.as_view(), name="portal-apikey-delete"),
|
2026-07-04 10:14:16 +08:00
|
|
|
path("models", ModelCatalogView.as_view(), name="portal-models"),
|
2026-07-03 14:49:45 +08:00
|
|
|
path("recharge", RechargePageView.as_view(), name="portal-recharge"),
|
2026-07-21 10:06:51 +08:00
|
|
|
path(
|
|
|
|
|
"migration/confirm/<uuid:request_id>",
|
|
|
|
|
MigrationConfirmView.as_view(),
|
|
|
|
|
name="portal-migration-confirm",
|
|
|
|
|
),
|
|
|
|
|
path("migration/devices", DeviceCredentialListView.as_view(), name="portal-device-credentials"),
|
|
|
|
|
path(
|
|
|
|
|
"migration/credentials/<int:pk>/revoke",
|
|
|
|
|
DeviceCredentialRevokeView.as_view(),
|
|
|
|
|
name="portal-device-credential-revoke",
|
|
|
|
|
),
|
2026-07-03 14:00:00 +08:00
|
|
|
path("records/recharge", RechargeRecordListView.as_view(), name="portal-recharge-records"),
|
|
|
|
|
path("records/usage", UsageRecordListView.as_view(), name="portal-usage-records"),
|
2026-07-03 11:27:45 +08:00
|
|
|
]
|