Begin adding platform support

This commit is contained in:
2023-03-09 23:27:16 +00:00
parent ac483711c4
commit 1e7d8f6c8d
17 changed files with 3724 additions and 47 deletions

View File

@@ -36,7 +36,8 @@ ELASTICSEARCH_USERNAME = getenv("ELASTICSEARCH_USERNAME", "elastic")
ELASTICSEARCH_PASSWORD = getenv("ELASTICSEARCH_PASSWORD", "changeme")
ELASTICSEARCH_HOST = getenv("ELASTICSEARCH_HOST", "localhost")
ELASTICSEARCH_TLS = getenv("ELASTICSEARCH_TLS", "false") in trues
ELASTICSEARCH_INDEX = getenv("ELASTICSEARCH_INDEX", "pluto")
ELASTICSEARCH_INDEX_ADS = getenv("ELASTICSEARCH_INDEX_ADS", "ads")
DEBUG = getenv("DEBUG", "false").lower() in trues
PROFILER = getenv("PROFILER", "false").lower() in trues

View File

@@ -20,7 +20,7 @@ from django.contrib.auth.views import LogoutView
from django.urls import include, path
from two_factor.urls import urlpatterns as tf_urls
from core.views import aggregators, banks, base, notifications
from core.views import aggregators, banks, base, notifications, platforms
# from core.views.stripe_callbacks import Callback
@@ -122,4 +122,25 @@ urlpatterns = [
banks.BanksTransactions.as_view(),
name="transactions",
),
# Platforms
path(
"platforms/<str:type>/",
platforms.PlatformList.as_view(),
name="platforms",
),
path(
"platforms/<str:type>/create/",
platforms.PlatformCreate.as_view(),
name="platform_create",
),
path(
"platforms/<str:type>/update/<str:pk>/",
platforms.PlatformUpdate.as_view(),
name="platform_update",
),
path(
"platforms/<str:type>/delete/<str:pk>/",
platforms.PlatformDelete.as_view(),
name="platform_delete",
),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)