diff --git a/ennstatus/donate/constants.py b/ennstatus/constants.py rename from ennstatus/donate/constants.py rename to ennstatus/constants.py diff --git a/ennstatus/donate/forms.py b/ennstatus/donate/forms.py --- a/ennstatus/donate/forms.py +++ b/ennstatus/donate/forms.py @@ -3,21 +3,5 @@ from wtforms import SelectField from wtforms.validators import DataRequired -COUNTRIES = [ - ('luxembourg', 'Luxembourg'), - ('united_kingdom', 'United Kingdom'), - ('united_states', 'United States of America'), - ('belgium', 'Belgium'), - ('france', 'France'), - ('germany', 'Germany'), -] - - class DateForm(Form): date = SelectField('date', validators=[DataRequired()]) - - -class BPMForm(Form): - country = SelectField('Country', - validators=[DataRequired()], - choices=COUNTRIES) diff --git a/ennstatus/donate/views.py b/ennstatus/donate/views.py --- a/ennstatus/donate/views.py +++ b/ennstatus/donate/views.py @@ -1,9 +1,8 @@ from flask import (Blueprint, render_template, request, redirect, url_for, current_app) -from ennstatus.donate.forms import DateForm, BPMForm +from ennstatus.donate.forms import DateForm from ennstatus.donate.functions import load_csv, get_choices -from ennstatus.donate.constants import BPM_ADDRESSES donate_page = Blueprint('donate', __name__) @@ -38,36 +37,9 @@ def flattr(): return render_template('donate/flattr.html') -@donate_page.route('/bpm', methods=('GET', 'POST')) +@donate_page.route('/bpm') def bpm(): - - current_app.logger.info('Handling BPM') - form = BPMForm() - 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 - return redirect(url_for('donate.bpm', country=country)) - else: - if 'country' in request.args: - country = request.args['country'] - if country in country_choices: - current_app.logger.info('Showing country %s' % country) - else: - current_app.logger.warn('Country %s not found' % country) - country = 'luxembourg' - else: - current_app.logger.info('Using default country') - country = 'luxembourg' - - form.country.data = country - - address = BPM_ADDRESSES[country] - - return render_template('donate/bpm.html', form=form, - address=address) + return render_template('donate/bpm.html') @donate_page.route('/received', diff --git a/ennstatus/templates/donate/bpm.html b/ennstatus/templates/donate/bpm.html --- a/ennstatus/templates/donate/bpm.html +++ b/ennstatus/templates/donate/bpm.html @@ -13,25 +13,6 @@ Marlon Brandobrainyquote -
We accept BPM points as they will be used for our BPM Parcel Station. The parcel station is used for receiving and sending mails and packages around the world!
Please mail all general inqueries to:
Frënn vun der Ënn, ASBL