Skip to main content

Vouchers in Django

Project description

This is a simple app to add vouchers support to your Django Project.

The idea is to define Forms for any kind of voucher that you want and add them to settings.VOUCHERS variable.

e.g: VOUCHERS = [(‘tshirt’, ‘project.vouchers.VoucherTShirtForm’)]

and then define in project/vouchers.py something like:

TSHIRT_SIZE = ((‘s’, ‘S’), (‘m’, ‘M’), (‘l’, ‘L’), (‘xl’, ‘XL’), (‘2xl’, ‘XXL’))

class VoucherTShirtForm(forms.Form):
token = forms.Charfield(max_length=50) size = forms.ChoiceField(choices=TSHIRT_SIZE) address = forms.CharField(max_length=200) email = forms.EmailField()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-vouchers-0.2.tar.gz (8.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page