99 lines
3.0 KiB
Python
99 lines
3.0 KiB
Python
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = "manage_subscriptions"
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"subscription/list/", views.SubscriptionView.as_view(), name="subscription_list"
|
|
),
|
|
path(
|
|
"subscription/add/",
|
|
views.SubscriptionCreateOrUpdateView.as_view(),
|
|
name="subscription_add",
|
|
),
|
|
path("subscription/<int:pk>/", views.SubscriptionDetailView.as_view(), name="subscription_detail"),
|
|
# path(
|
|
# "subscription/edit/<int:pk>/",
|
|
# views.SubscriptionCreateOrUpdateView.as_view(),
|
|
# name="subscription_edit",
|
|
# ),
|
|
path(
|
|
"subscription/delete/<int:pk>",
|
|
views.SubscriptionDeleteView.as_view(),
|
|
name="subscription_delete",
|
|
),
|
|
# Stripe Products
|
|
path(
|
|
"product/list/", views.StripeProductView.as_view(), name="stripe_product_list"
|
|
),
|
|
path(
|
|
"product/add/",
|
|
views.StripeProductCreateOrUpdateView.as_view(),
|
|
name="stripe_product_add",
|
|
),
|
|
# path(
|
|
# "product/delete/<int:pk>",
|
|
# views.StripeProductDeleteView.as_view(),
|
|
# name="stripe_product_delete",
|
|
# ),
|
|
# PLANS
|
|
path("plan/list/", views.PlanView.as_view(), name="plan_list"),
|
|
# path(
|
|
# "plan/add/",
|
|
# views.PlanCreateOrUpdateView.as_view(),
|
|
# name="plan_add",
|
|
# ),
|
|
# path(
|
|
# "plan/edit/<int:pk>/",
|
|
# views.PlanCreateOrUpdateView.as_view(),
|
|
# name="plan_edit",
|
|
# ),
|
|
# path(
|
|
# "plan/delete/<int:pk>",
|
|
# views.PlanDeleteView.as_view(),
|
|
# name="plan_delete",
|
|
# ),
|
|
# Principal Subscription
|
|
path(
|
|
"principal_subscription/list/",
|
|
views.PrincipalSubscriptionView.as_view(),
|
|
name="principal_subscriptions_list",
|
|
),
|
|
# path(
|
|
# "principal_subscription/add/",
|
|
# views.PrincipalSubscriptionCreateOrUpdateView.as_view(),
|
|
# name="principal_subscription_add",
|
|
# ),
|
|
path(
|
|
"principal_subscription/edit/<int:pk>/",
|
|
views.PrincipalSubscriptionCreateOrUpdateView.as_view(),
|
|
name="principal_subscription_edit",
|
|
),
|
|
path(
|
|
"principal_subscription/delete/<int:pk>",
|
|
views.PrincipalSubscriptionDeleteView.as_view(),
|
|
name="principal_subscription_delete",
|
|
),
|
|
path(
|
|
"stripe-subscription/",
|
|
views.stripe_config,
|
|
name="stripe_subscription",
|
|
),
|
|
path(
|
|
"create-checkout-session/",
|
|
views.create_checkout_session,
|
|
name="create_checkout_session",
|
|
),
|
|
path(
|
|
"coupon-validity-check/",
|
|
views.validate_coupon,
|
|
name="validate_coupon",
|
|
),
|
|
path("stripe/", views.SubscriptionPageView.as_view(), name="stripe"),
|
|
path("active/", views.ActiveSubscriptionView.as_view(), name="active"),
|
|
path("success/", views.SuccessView.as_view(), name="success"),
|
|
path("cancel/", views.CancelView.as_view(), name="cancel"),
|
|
# path("join-now/", views.IndexView.as_view(), name="index"),
|
|
]
|