Complete processing pipeline for Signal
This commit is contained in:
210
app/urls.py
Normal file
210
app/urls.py
Normal file
@@ -0,0 +1,210 @@
|
||||
"""app URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/4.0/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.views import LogoutView
|
||||
from django.urls import include, path
|
||||
from django.views.generic import TemplateView
|
||||
from two_factor.urls import urlpatterns as tf_urls
|
||||
|
||||
from core.views import base, notifications, signal, people, ais, groups, personas, manipulations, identifiers, sessions, messages
|
||||
|
||||
urlpatterns = [
|
||||
path("__debug__/", include("debug_toolbar.urls")),
|
||||
path("", base.Home.as_view(), name="home"),
|
||||
path("admin/", admin.site.urls),
|
||||
# 2FA login urls
|
||||
path("", include(tf_urls)),
|
||||
path("accounts/signup/", base.Signup.as_view(), name="signup"),
|
||||
path("accounts/logout/", LogoutView.as_view(), name="logout"),
|
||||
# Notifications
|
||||
path(
|
||||
"notifications/<str:type>/update/",
|
||||
notifications.NotificationsUpdate.as_view(),
|
||||
name="notifications_update",
|
||||
),
|
||||
path(
|
||||
"services/signal/",
|
||||
signal.Signal.as_view(),
|
||||
name="signal",
|
||||
),
|
||||
path(
|
||||
"services/signal/<str:type>/",
|
||||
signal.SignalAccounts.as_view(),
|
||||
name="signal_accounts",
|
||||
),
|
||||
path(
|
||||
"services/signal/<str:type>/contacts/<str:pk>/",
|
||||
signal.SignalContactsList.as_view(),
|
||||
name="signal_contacts",
|
||||
),
|
||||
path(
|
||||
"services/signal/<str:type>/chats/<str:pk>/",
|
||||
signal.SignalChatsList.as_view(),
|
||||
name="signal_chats",
|
||||
),
|
||||
path(
|
||||
"services/signal/<str:type>/messages/<str:pk>/<str:chat_id>/",
|
||||
signal.SignalMessagesList.as_view(),
|
||||
name="signal_messages",
|
||||
),
|
||||
path(
|
||||
"services/signal/<str:type>/add/",
|
||||
signal.SignalAccountAdd.as_view(),
|
||||
name="signal_account_add",
|
||||
),
|
||||
# AIs
|
||||
path(
|
||||
"ai/<str:type>/",
|
||||
ais.AIList.as_view(),
|
||||
name="ais",
|
||||
),
|
||||
path(
|
||||
"ai/<str:type>/create/",
|
||||
ais.AICreate.as_view(),
|
||||
name="ai_create",
|
||||
),
|
||||
path(
|
||||
"ai/<str:type>/update/<str:pk>/",
|
||||
ais.AIUpdate.as_view(),
|
||||
name="ai_update",
|
||||
),
|
||||
path(
|
||||
"ai/<str:type>/delete/<str:pk>/",
|
||||
ais.AIDelete.as_view(),
|
||||
name="ai_delete",
|
||||
),
|
||||
|
||||
# People
|
||||
path(
|
||||
"person/<str:type>/",
|
||||
people.PersonList.as_view(),
|
||||
name="people",
|
||||
),
|
||||
path(
|
||||
"person/<str:type>/create/",
|
||||
people.PersonCreate.as_view(),
|
||||
name="person_create",
|
||||
),
|
||||
path(
|
||||
"person/<str:type>/update/<str:pk>/",
|
||||
people.PersonUpdate.as_view(),
|
||||
name="person_update",
|
||||
),
|
||||
path(
|
||||
"person/<str:type>/delete/<str:pk>/",
|
||||
people.PersonDelete.as_view(),
|
||||
name="person_delete",
|
||||
),
|
||||
|
||||
# Groups
|
||||
path(
|
||||
"group/<str:type>/",
|
||||
groups.GroupList.as_view(),
|
||||
name="groups",
|
||||
),
|
||||
path(
|
||||
"group/<str:type>/create/",
|
||||
groups.GroupCreate.as_view(),
|
||||
name="group_create",
|
||||
),
|
||||
path(
|
||||
"group/<str:type>/update/<str:pk>/",
|
||||
groups.GroupUpdate.as_view(),
|
||||
name="group_update",
|
||||
),
|
||||
path(
|
||||
"group/<str:type>/delete/<str:pk>/",
|
||||
groups.GroupDelete.as_view(),
|
||||
name="group_delete",
|
||||
),
|
||||
|
||||
# Personas
|
||||
path(
|
||||
"persona/<str:type>/",
|
||||
personas.PersonaList.as_view(),
|
||||
name="personas",
|
||||
),
|
||||
path(
|
||||
"persona/<str:type>/create/",
|
||||
personas.PersonaCreate.as_view(),
|
||||
name="persona_create",
|
||||
),
|
||||
path(
|
||||
"persona/<str:type>/update/<str:pk>/",
|
||||
personas.PersonaUpdate.as_view(),
|
||||
name="persona_update",
|
||||
),
|
||||
path(
|
||||
"persona/<str:type>/delete/<str:pk>/",
|
||||
personas.PersonaDelete.as_view(),
|
||||
name="persona_delete",
|
||||
),
|
||||
|
||||
# Manipulations
|
||||
path(
|
||||
"manipulation/<str:type>/",
|
||||
manipulations.ManipulationList.as_view(),
|
||||
name="manipulations",
|
||||
),
|
||||
path(
|
||||
"manipulation/<str:type>/create/",
|
||||
manipulations.ManipulationCreate.as_view(),
|
||||
name="manipulation_create",
|
||||
),
|
||||
path(
|
||||
"manipulation/<str:type>/update/<str:pk>/",
|
||||
manipulations.ManipulationUpdate.as_view(),
|
||||
name="manipulation_update",
|
||||
),
|
||||
path(
|
||||
"manipulation/<str:type>/delete/<str:pk>/",
|
||||
manipulations.ManipulationDelete.as_view(),
|
||||
name="manipulation_delete",
|
||||
),
|
||||
# Sessions
|
||||
path(
|
||||
"session/<str:type>/",
|
||||
sessions.SessionList.as_view(),
|
||||
name="sessions",
|
||||
),
|
||||
path(
|
||||
"session/<str:type>/create/",
|
||||
sessions.SessionCreate.as_view(),
|
||||
name="session_create",
|
||||
),
|
||||
path(
|
||||
"session/<str:type>/update/<str:pk>/",
|
||||
sessions.SessionUpdate.as_view(),
|
||||
name="session_update",
|
||||
),
|
||||
path(
|
||||
"session/<str:type>/delete/<str:pk>/",
|
||||
sessions.SessionDelete.as_view(),
|
||||
name="session_delete",
|
||||
),
|
||||
# Identifiers
|
||||
path("person/<str:type>/identifiers/<str:person>/", identifiers.PersonIdentifierList.as_view(), name="person_identifiers"),
|
||||
path("person/<str:type>/identifiers/create/<str:person>", identifiers.PersonIdentifierCreate.as_view(), name="person_identifier_create"),
|
||||
path("person/<str:type>/identifiers/update/<str:person>/<str:pk>/", identifiers.PersonIdentifierUpdate.as_view(), name="person_identifier_update"),
|
||||
path("person/<str:type>/identifiers/delete/<str:person>/<str:pk>/", identifiers.PersonIdentifierDelete.as_view(), name="person_identifier_delete"),
|
||||
# Messages
|
||||
path("session/<str:type>/messages/<str:session>/", messages.MessageList.as_view(), name="messages"),
|
||||
path("session/<str:type>/messages/create/<str:session>", messages.MessageCreate.as_view(), name="message_create"),
|
||||
path("session/<str:type>/messages/update/<str:session>/<str:pk>/", messages.MessageUpdate.as_view(), name="message_update"),
|
||||
path("session/<str:type>/messages/delete/<str:session>/<str:pk>/", messages.MessageDelete.as_view(), name="message_delete"),
|
||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
Reference in New Issue
Block a user