diff options
author | MichaĆ Ociepka <michal@ociepka.info> | 2016-02-05 16:10:08 +0100 |
---|---|---|
committer | Patryk Zawadzki <patrys@room-303.com> | 2016-02-08 12:05:31 +0100 |
commit | 7e524cbc84b7d38dfbdfc540d6c0efa10bb18bd7 (patch) | |
tree | ae8c2bca18e79b9adcaaf766e16ff7cadeb2fd63 /saleor/discount | |
parent | ecdaa3e37cbf21d8d944c709c33e8fdab2028c57 (diff) | |
download | saleor-frontend-7e524cbc84b7d38dfbdfc540d6c0efa10bb18bd7.tar.gz saleor-frontend-7e524cbc84b7d38dfbdfc540d6c0efa10bb18bd7.tar.bz2 saleor-frontend-7e524cbc84b7d38dfbdfc540d6c0efa10bb18bd7.zip |
Add discount form to checkout
Diffstat (limited to 'saleor/discount')
-rw-r--r-- | saleor/discount/forms.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/saleor/discount/forms.py b/saleor/discount/forms.py new file mode 100644 index 00000000..798ac87d --- /dev/null +++ b/saleor/discount/forms.py @@ -0,0 +1,13 @@ +from django import forms +from django.utils.translation import pgettext_lazy + +from .models import Voucher + + +class GetVoucherForm(forms.Form): + + voucher = forms.ModelChoiceField( + queryset=Voucher.objects.all(), to_field_name='code', + label=pgettext_lazy('voucher_form', 'code'), + widget=forms.TextInput) + |