Changeset - f3d6dfa3b589
[Not reviewed]
version_5
0 3 0
Dennis Fink - 10 years ago 2015-07-21 22:41:10
dennis.fink@c3l.lu
Backout 05866e023ce5
3 files changed with 8 insertions and 4 deletions:
0 comments (0 inline, 0 general)
ennstatus/donate/views.py
Show inline comments
 
@@ -29,8 +29,9 @@ def snailmail():
 

	
 
    if request.method == 'POST':
 
        current_app.logger.debug('Validating form')
 
        country = form.country.data
 
        return redirect(url_for('donate.snailmail', country=country))
 
        if form.validate_on_submit():
 
            country = form.country.data
 
            return redirect(url_for('donate.snailmail', country=country))
 
    else:
 
        if 'country' in request.args:
 
            country = request.args['country']
ennstatus/root/forms.py
Show inline comments
 
@@ -3,6 +3,7 @@ from wtforms import SelectField, StringF
 
from wtforms.validators import InputRequired, Email, Length, DataRequired
 

	
 

	
 

	
 
COUNTRIES = [
 
    ('luxembourg', 'Luxembourg'),
 
    ('united_kingdom', 'United Kingdom'),
 
@@ -15,6 +16,7 @@ COUNTRIES = [
 

	
 
class BPMForm(Form):
 
    country = SelectField('Country',
 
                          validators=[DataRequired()],
 
                          choices=COUNTRIES)
 

	
 

	
ennstatus/root/views.py
Show inline comments
 
@@ -62,8 +62,9 @@ def contact():
 

	
 
    if request.method == 'POST':
 
        current_app.logger.debug('Validating form')
 
        country = form.country.data
 
        return redirect(url_for('root.contact', country=country))
 
        if form.validate_on_submit():
 
            country = form.country.data
 
            return redirect(url_for('root.contact', country=country))
 
    else:
 
        if 'country' in request.args:
 
            country = request.args['country']
0 comments (0 inline, 0 general)