From f52b529c86e8236f255b8a2f63ab27d855df184f Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sun, 13 Nov 2022 10:56:00 -0700 Subject: [PATCH] Remove contact page --- src/dashboard/templates/dashboard/stock.html | 2 +- src/storefront/urls.py | 1 - src/storefront/views.py | 11 ----------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/dashboard/templates/dashboard/stock.html b/src/dashboard/templates/dashboard/stock.html index 9c177b2..69d4817 100644 --- a/src/dashboard/templates/dashboard/stock.html +++ b/src/dashboard/templates/dashboard/stock.html @@ -27,7 +27,7 @@
{{variant}}
{{ variant.sku }} - {{ variant.stock }} + {{ variant.stock|default_if_none:"0" }} {{ variant.total_in_warehouse }} Restock → {% endwith %} diff --git a/src/storefront/urls.py b/src/storefront/urls.py index 3512184..845250b 100644 --- a/src/storefront/urls.py +++ b/src/storefront/urls.py @@ -5,7 +5,6 @@ urlpatterns = [ path('about/', views.AboutView.as_view(), name='about'), path('fair-trade/', views.FairTradeView.as_view(), name='fair-trade'), path('reviews/', views.ReviewListView.as_view(), name='reviews'), - path('contact/', views.ContactFormView.as_view(), name='contact'), path( 'subscriptions/', views.SubscriptionCreateView.as_view(), diff --git a/src/storefront/views.py b/src/storefront/views.py index 26aaab4..67bd368 100644 --- a/src/storefront/views.py +++ b/src/storefront/views.py @@ -558,17 +558,6 @@ class ReviewListView(TemplateView): template_name = 'storefront/reviews.html' -class ContactFormView(FormView, SuccessMessageMixin): - template_name = 'storefront/contact_form.html' - form_class = ContactForm - success_url = reverse_lazy('storefront:product-list') - success_message = 'Message sent.' - - def form_valid(self, form): - form.send_email() - return super().form_valid(form) - - class SubscriptionCreateView(FormView): template_name = 'storefront/subscriptions.html' form_class = SubscriptionCreateForm