Added Hosting Order model, Created Billing Address Model , Method to create a customer using Stripe API , Created Customer Stripe profile to store for further charges , Method in order to charge an amount to a customer
This commit is contained in:
parent
f5978a7da9
commit
bf334a38d4
17 changed files with 281 additions and 42 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from django.utils.translation import ugettext as _
|
||||
from django.db import models
|
||||
from django import forms
|
||||
|
||||
# http://xml.coverpages.org/country3166.html
|
||||
|
|
@ -245,10 +246,11 @@ COUNTRIES = (
|
|||
)
|
||||
|
||||
|
||||
class CountryField(forms.ChoiceField):
|
||||
class CountryField(models.CharField):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs.setdefault('choices', COUNTRIES)
|
||||
kwargs.setdefault('initial', 'CH')
|
||||
kwargs.setdefault('default', 'CH')
|
||||
kwargs.setdefault('max_length', 2)
|
||||
|
||||
super(CountryField, self).__init__(*args, **kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue