Changeset - 4abf18c39fcd
[Not reviewed]
version_5
0 3 0
Dennis Fink - 9 years ago 2015-10-16 20:39:49
dennis.fink@c3l.lu
Remove united_kingdom and united_states
3 files changed with 0 insertions and 22 deletions:
0 comments (0 inline, 0 general)
ennstatus/donate/views.py
Show inline comments
 
@@ -4,28 +4,20 @@ from flask import (Blueprint, render_tem
 
from ennstatus.donate.forms import DateForm
 
from ennstatus.donate.functions import load_csv, get_choices
 

	
 
from ennstatus.root.forms import BPMForm
 
from ennstatus.root.constants import BPM_ADDRESSES
 

	
 
COUNTRIES = [
 
    ('luxembourg', 'Luxembourg'),
 
    ('belgium', 'Belgium'),
 
    ('france', 'France'),
 
    ('germany', 'Germany'),
 
]
 

	
 
donate_page = Blueprint('donate', __name__)
 

	
 

	
 
@donate_page.route('/', methods=('GET', 'POST'))
 
def index():
 

	
 
    current_app.logger.info('Handling index')
 
    form = BPMForm()
 
    form.country.choices = COUNTRIES
 
    country_choices = [choice[0] for choice in form.country.choices]
 

	
 
    if request.method == 'POST':
 
        current_app.logger.debug('Validating form')
 
        if form.validate_on_submit():
 
            country = form.country.data
ennstatus/root/constants.py
Show inline comments
 

	
 
BPM_ADDRESSES = {
 
    'united_kingdom': {
 
        'address': '372 Old Street',
 
        'postal_code': 'EC1V 9AU',
 
        'city': 'London',
 
        'country': 'United Kingdom',
 
    },
 
    'united_states': {
 
        'address': '8345 NW 66 Street 2000',
 
        'postal_code': '33166-2626',
 
        'city': 'Miami',
 
        'country': 'United States of America',
 
    },
 
    'germany': {
 
        'address': 'Zum Bürgerwehr 28',
 
        'postal_code': 'D-54516',
 
        'city': 'Wittlich',
 
        'country': 'Germany',
 
    },
ennstatus/root/forms.py
Show inline comments
 
@@ -7,14 +7,12 @@ from wtforms import (SelectField,
 
                     )
 
from wtforms.validators import InputRequired, Email, Length, DataRequired
 

	
 

	
 
COUNTRIES = [
 
    ('luxembourg', 'Luxembourg'),
 
    ('united_kingdom', 'United Kingdom'),
 
    ('united_states', 'United States of America'),
 
    ('belgium', 'Belgium'),
 
    ('france', 'France'),
 
    ('germany', 'Germany'),
 
]
 

	
 

	
0 comments (0 inline, 0 general)