Skip to content

Saleor Core: the high performance, composable, headless commerce API.

remove note.html and fix CodeClimate warnings

Jon Lawrence01c60ad00911
diff --git a/saleor/checkout/forms.py b/saleor/checkout/forms.py
index 27744ed04e..e6c133a74a 100644
--- a/saleor/checkout/forms.py
+++ b/saleor/checkout/forms.py
@@ -115,8 +115,7 @@ class AnonymousUserBillingForm(forms.Form):
label=pgettext_lazy('Billing form field label', 'Email'))
-
class NoteForm(forms.Form):
- """ Form to add a note to an order as it is created for shop staff to see """
+ """ Form to add a note to an order as it is
+ created for shop staff to see """
note = forms.CharField(max_length=250, required=False)
-
diff --git a/saleor/checkout/views/__init__.py b/saleor/checkout/views/__init__.py
index 870b9c779b..68bb303817 100644
--- a/saleor/checkout/views/__init__.py
+++ b/saleor/checkout/views/__init__.py
@@ -81,21 +81,3 @@ def login(request, checkout):
return redirect('checkout:index')
form = LoginForm()
return TemplateResponse(request, 'checkout/login.html', {'form': form})
-
-
-@load_checkout
-@validate_voucher
-@validate_cart
-@add_voucher_form
-def note_view(request, checkout):
- note_form = NoteForm(request.POST or None)
- if note_form.is_valid():
- checkout.note = note_form.cleaned_data['note']
- return redirect('checkout:summary')
- return TemplateResponse(
- request, 'checkout/note.html',
- context={
- 'note_form': note_form,
- 'checkout': checkout})
-
-
diff --git a/templates/checkout/note.html b/templates/checkout/note.html
deleted file mode 100644
index a750e6d39a..0000000000
--- a/templates/checkout/note.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{% extends "checkout/details.html" %}
-{% load i18n %}
-{% load gross from prices_i18n %}
-{% load bootstrap_form from bootstrap3 %}
-
-{% block forms %}
- <h3>{% trans "Order Notes" context "Checkout note title" %}</h3> <hr>
- <form method="post" novalidate>
- {% csrf_token %}
- <h2>{% trans "Add a note to your order" context "Checkout note form title" %}</h2>
- {% bootstrap_form note_form show_label=False %}
- <p class="text-md-right">
- <button type="submit" class="btn primary">
- {% trans "Continue" context "Checkout note primary action" %}
- </button>
- </p>
- </form>
-{% endblock %}