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:
Levi 2016-04-26 01:16:03 -05:00
commit bf334a38d4
17 changed files with 281 additions and 42 deletions

View file

@ -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)