Implement CRUD for accounts and trades
This commit is contained in:
45
app/urls.py
45
app/urls.py
@@ -21,7 +21,7 @@ from django.urls import include, path
|
||||
from django.views.generic import TemplateView
|
||||
from django_otp.forms import OTPAuthenticationForm
|
||||
|
||||
from core.views import base, callbacks, hooks
|
||||
from core.views import accounts, base, callbacks, hooks, trades
|
||||
from core.views.stripe_callbacks import Callback
|
||||
|
||||
urlpatterns = [
|
||||
@@ -72,4 +72,47 @@ urlpatterns = [
|
||||
name="callbacks",
|
||||
),
|
||||
path("callbacks/<str:type>/", callbacks.Callbacks.as_view(), name="callbacks"),
|
||||
path("accounts/<str:type>/", accounts.Accounts.as_view(), name="accounts"),
|
||||
path(
|
||||
"accounts/<str:type>/add/",
|
||||
accounts.AccountAction.as_view(),
|
||||
name="account_action",
|
||||
),
|
||||
path(
|
||||
"accounts/<str:type>/add/<str:name>/",
|
||||
accounts.AccountAction.as_view(),
|
||||
name="account_action",
|
||||
),
|
||||
path(
|
||||
"accounts/<str:type>/del/<str:account_id>/",
|
||||
accounts.AccountAction.as_view(),
|
||||
name="account_action",
|
||||
),
|
||||
path(
|
||||
"accounts/<str:type>/edit/<str:account_id>/",
|
||||
accounts.AccountAction.as_view(),
|
||||
name="account_action",
|
||||
),
|
||||
path("trades/<str:type>/", trades.Trades.as_view(), name="trades"),
|
||||
path("trades/<str:type>/add/", trades.TradeAction.as_view(), name="trade_action"),
|
||||
path(
|
||||
"trades/<str:type>/<str:account_id>/",
|
||||
trades.Trades.as_view(),
|
||||
name="trades",
|
||||
),
|
||||
path(
|
||||
"trades/<str:type>/add/<str:name>/",
|
||||
trades.TradeAction.as_view(),
|
||||
name="trade_action",
|
||||
),
|
||||
path(
|
||||
"trades/<str:type>/del/<str:trade_id>/",
|
||||
trades.TradeAction.as_view(),
|
||||
name="trade_action",
|
||||
),
|
||||
path(
|
||||
"trades/<str:type>/edit/<str:trade_id>/",
|
||||
trades.TradeAction.as_view(),
|
||||
name="trade_action",
|
||||
),
|
||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user