2020-01-15 20:15:14 -05:00
|
|
|
from django.urls import path, include
|
|
|
|
|
from django.views.generic.base import RedirectView
|
|
|
|
|
from django.contrib.auth.views import *
|
|
|
|
|
from django.urls import reverse_lazy
|
|
|
|
|
from trading.views import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app_name = "trading"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
|
path("", IndexView.as_view(), name="index"),
|
|
|
|
|
path("login/", RedirectView.as_view(url=reverse_lazy("trading:login"))),
|
|
|
|
|
path("logout/", RedirectView.as_view(url=reverse_lazy("trading:logout"))),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/login/",
|
|
|
|
|
LoginView.as_view(template_name="trading/account/login.html",),
|
|
|
|
|
name="login",
|
|
|
|
|
),
|
|
|
|
|
path("accounts/logout/", LogoutView.as_view(), name="logout"),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/password_reset/",
|
|
|
|
|
PasswordResetView.as_view(
|
|
|
|
|
template_name="trading/account/password_reset.html",
|
|
|
|
|
success_url=reverse_lazy("trading:password_reset_done"),
|
|
|
|
|
),
|
|
|
|
|
name="password_reset",
|
|
|
|
|
),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/password_reset_done/",
|
|
|
|
|
PasswordResetDoneView.as_view(
|
|
|
|
|
template_name="trading/account/password_reset_done.html"
|
|
|
|
|
),
|
|
|
|
|
name="password_reset_done",
|
|
|
|
|
),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/password_reset_confirm/",
|
|
|
|
|
PasswordResetConfirmView.as_view(
|
|
|
|
|
template_name="trading/account/password_reset_confirm.html",
|
|
|
|
|
success_url=reverse_lazy("trading:password_reset_complete"),
|
|
|
|
|
),
|
|
|
|
|
name="password_reset_confirm",
|
|
|
|
|
),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/password_reset_complete/",
|
|
|
|
|
PasswordResetCompleteView.as_view(
|
|
|
|
|
template_name="trading/account/password_reset_complete.html"
|
|
|
|
|
),
|
|
|
|
|
name="password_reset_complete",
|
|
|
|
|
),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/password_change/",
|
|
|
|
|
PasswordChangeView.as_view(
|
|
|
|
|
template_name="trading/account/password_change.html",
|
|
|
|
|
success_url=reverse_lazy("trading:password_change_done"),
|
|
|
|
|
),
|
|
|
|
|
name="password_change",
|
|
|
|
|
),
|
|
|
|
|
path(
|
|
|
|
|
"accounts/password_change_done/",
|
|
|
|
|
PasswordChangeDoneView.as_view(
|
|
|
|
|
template_name="trading/account/password_change_done.html"
|
|
|
|
|
),
|
|
|
|
|
name="password_change_done",
|
|
|
|
|
),
|
|
|
|
|
path("accounts/settings/", UserSettingsView.as_view(), name="settings"),
|
|
|
|
|
|
|
|
|
|
# u/ for users
|
|
|
|
|
path("u/profile/<int:pk>/", UserProfileView.as_view(), name="user_profile"),
|
|
|
|
|
|
|
|
|
|
# t/ for tx
|
2020-03-26 15:18:41 -04:00
|
|
|
path("t/<str:pk>/", TxRequestDetailView.as_view(), name="tx_detail"),
|
2020-03-21 14:57:14 -04:00
|
|
|
path("t/", TxRequestListView.as_view(), name="tx_list"),
|
|
|
|
|
|
2020-01-15 20:15:14 -05:00
|
|
|
# c/ for commodities
|
|
|
|
|
path("c/create/", CommodityCreateView.as_view(), name="commodity_create"),
|
2020-03-26 15:18:41 -04:00
|
|
|
path("c/", CommodityListView.as_view(), name="commodity_list"),
|
|
|
|
|
path("c/<str:pk>/", CommodityDetailView.as_view(), name="commodity_detail"),
|
2020-01-15 20:15:14 -05:00
|
|
|
]
|