Private
Public Access
1
0

billing address to user

This commit is contained in:
Sander Roosendaal
2018-12-18 12:39:34 +01:00
parent 63a6114e0b
commit 6d7d9f5792
3 changed files with 11 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ class RowerInline(admin.StackedInline):
filter_horizontal = ('team','friends') filter_horizontal = ('team','friends')
fieldsets = ( fieldsets = (
('Billing Details',
{'fields':('street_address','city','postal_code','country',)}),
('Rower Plan', ('Rower Plan',
{'fields':('rowerplan','paymenttype','planexpires','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}), {'fields':('rowerplan','paymenttype','planexpires','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}),
('Rower Settings', ('Rower Settings',

View File

@@ -17,6 +17,7 @@ import os
import twitter import twitter
import re import re
import pytz import pytz
from django_countries.fields import CountryField
from scipy.interpolate import splprep, splev, CubicSpline from scipy.interpolate import splprep, splev, CubicSpline
import numpy as np import numpy as np
@@ -571,6 +572,13 @@ class Rower(models.Model):
('Yoga','Yoga'), ('Yoga','Yoga'),
) )
user = models.OneToOneField(User) user = models.OneToOneField(User)
#billing details
country = CountryField(default=None, null=True, blank=True)
street_address = models.CharField(default='',blank=True,null=True,max_length=200)
city = models.CharField(default='',blank=True,null=True,max_length=200)
postal_code = models.CharField(default='',blank=True,null=True,max_length=200)
gdproptin = models.BooleanField(default=False) gdproptin = models.BooleanField(default=False)
gdproptindate = models.DateTimeField(blank=True,null=True) gdproptindate = models.DateTimeField(blank=True,null=True)

View File

@@ -66,6 +66,7 @@ INSTALLED_APPS = [
'django_extensions', 'django_extensions',
'tz_detect', 'tz_detect',
'django_social_share', 'django_social_share',
'django_countries',
] ]
AUTHENTICATION_BACKENDS = ( AUTHENTICATION_BACKENDS = (