adding trailing slashes to post forms
This commit is contained in:
@@ -746,7 +746,8 @@ class PlanSelectForm(forms.Form):
|
||||
self.fields['plan'].empty_label = None
|
||||
if paymentprocessor:
|
||||
self.fields['plan'].queryset = PaidPlan.objects.filter(
|
||||
paymentprocessor=paymentprocessor
|
||||
paymentprocessor=paymentprocessor,
|
||||
active=True
|
||||
).exclude(
|
||||
shortname="basic"
|
||||
).order_by(
|
||||
@@ -758,7 +759,8 @@ class PlanSelectForm(forms.Form):
|
||||
except AttributeError:
|
||||
amount = 0
|
||||
self.fields['plan'].queryset = PaidPlan.objects.filter(
|
||||
paymentprocessor=rower.paymentprocessor
|
||||
paymentprocessor=rower.paymentprocessor,
|
||||
active=True
|
||||
).exclude(
|
||||
price__lte=amount
|
||||
).order_by(
|
||||
|
||||
@@ -568,6 +568,8 @@ class PaidPlan(models.Model):
|
||||
choices=paymenttypes,
|
||||
)
|
||||
|
||||
active = models.BooleanField(default=True)
|
||||
|
||||
clubsize = models.IntegerField(default=0)
|
||||
|
||||
def __unicode__(self):
|
||||
|
||||
@@ -10,30 +10,30 @@ def planstopaypal():
|
||||
plan.external_id = None
|
||||
plan.save()
|
||||
|
||||
def initiaterowerplans():
|
||||
rowers = Rower.objects.filter(paymenttype = 'recurring',paidplan = None)
|
||||
for r in rowers:
|
||||
r.paymentprocessor = 'paypal'
|
||||
r.save()
|
||||
#def initiaterowerplans():
|
||||
# rowers = Rower.objects.filter(paymenttype = 'recurring',paidplan = None)
|
||||
# for r in rowers:
|
||||
# r.paymentprocessor = 'paypal'
|
||||
# r.save()
|
||||
|
||||
def setrowerplans():
|
||||
rowers = Rower.objects.all()
|
||||
#def setrowerplans():
|
||||
# rowers = Rower.objects.all()
|
||||
|
||||
for r in rowers:
|
||||
paidplans = PaidPlan.objects.filter(
|
||||
shortname = r.rowerplan,
|
||||
paymenttype = r.paymenttype,
|
||||
clubsize = r.clubsize,
|
||||
paymentprocessor=r.paymentprocessor)
|
||||
# for r in rowers:
|
||||
# paidplans = PaidPlan.objects.filter(
|
||||
# shortname = r.rowerplan,
|
||||
# paymenttype = r.paymenttype,
|
||||
# clubsize = r.clubsize,
|
||||
# paymentprocessor=r.paymentprocessor)
|
||||
|
||||
if paidplans:
|
||||
r.paidplan = paidplans[0]
|
||||
r.save()
|
||||
else:
|
||||
try:
|
||||
print 'Could not set plan for ',r.user.username
|
||||
except:
|
||||
pass
|
||||
# if paidplans:
|
||||
# r.paidplan = paidplans[0]
|
||||
# r.save()
|
||||
# else:
|
||||
# try:
|
||||
# print 'Could not set plan for ',r.user.username
|
||||
# except:
|
||||
# pass
|
||||
|
||||
def is_existing_customer(rower):
|
||||
if rower.country is not None and rower.customer_id is not None and rower.country != '':
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
|
||||
<p>Unless specified otherwise, the payments on the
|
||||
recurring payment plans are annual. The prices are specified
|
||||
as a price per year.
|
||||
as a price per year. You can downgrade or cancel your
|
||||
plan at any time in your <a href="/rowers/me/edit/">settings</a>.
|
||||
</p>
|
||||
|
||||
<table width="100%">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
{% extends "newbase.html" %}
|
||||
{% block title %}Rowsandall Paid Membership{% endblock title %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<a href="/rowers/downgrade">Change Downgrade</a>
|
||||
</li>
|
||||
<li class="grid_4">
|
||||
<form id="payment-form" method="post" action="/rowers/downgradecheckouts"
|
||||
<form id="payment-form" method="post" action="/rowers/downgradecheckouts/"
|
||||
autocomplete="off">
|
||||
<section>
|
||||
<label for="amount">
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
{{ the_div|safe }}
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form enctype="multipart/form-data" action="/rowers/fitness-progress/user/{{ rower.user.id }}" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/fitness-progress/user/{{ rower.user.id }}/" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<form method="POST" action="/rowers/me/delete" class="padding">
|
||||
<form method="POST" action="/rowers/me/delete/" class="padding">
|
||||
{% csrf_token %}
|
||||
<input id="id_delete_user" type="hidden" name="delete_user" value="True">
|
||||
<input class="button red small" type="submit" name="action" value="DELETE ACCOUNT">
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
</p>
|
||||
{% if team %}
|
||||
<p>
|
||||
<form id="searchform" action="/rowers/list-workouts/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||
<form id="searchform" action="/rowers/list-workouts/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
||||
method="get" accept-charset="utf-8">
|
||||
{% else %}
|
||||
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
||||
method="get" accept-charset="utf-8">
|
||||
{% endif %}
|
||||
{{ searchform }}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/user/{{ userid }}" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/user/{{ userid }}/" method="post">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ chartform.as_table }}
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
hosting costs, we have created paid plans offering extended
|
||||
functionality.
|
||||
</p>
|
||||
<p>
|
||||
All plans are valid for a year. Recurring payment plans will automatically
|
||||
bill you at the start of a new 12 month period. You can stop your plan
|
||||
at any time in your <a href="/rowers/me/edit/">settings</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<table class="plantable shortpadded" width="80%">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<a href="/rowers/billing">Change Order</a>
|
||||
</li>
|
||||
<li class="grid_4">
|
||||
<form id="payment-form" method="post" action="/rowers/checkouts"
|
||||
<form id="payment-form" method="post" action="/rowers/checkouts/"
|
||||
autocomplete="off">
|
||||
<section>
|
||||
<label for="amount">
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
<h2>BrainTree Experimental Corner</h2>
|
||||
|
||||
<form id="payment-form" method="post" action="/rowers/checkouts"
|
||||
<form id="payment-form" method="post" action="/rowers/checkouts/"
|
||||
autocomplete="off">
|
||||
<section>
|
||||
<label for="amount">
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<a href="/rowers/sessions/{{ thesession.id }}/clone/?when={{ timeperiod }}">Clone</a>
|
||||
</p>
|
||||
<input class="button green"
|
||||
action="/rowers/sessions/{{ thesession.id }}/edit/user/{{ rower.user.id }}" type="submit" value="Save">
|
||||
action="/rowers/sessions/{{ thesession.id }}/edit/user/{{ rower.user.id }}/" type="submit" value="Save">
|
||||
</form>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
{% csrf_token %}
|
||||
|
||||
<input name="piece" class="button green"
|
||||
formaction="/rowers/ote-bests/user/{{ id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||
formaction="/rowers/ote-bests/user/{{ id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
||||
type="submit" value="Add">
|
||||
</form>
|
||||
</li>/
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ul class="main-content">
|
||||
<li class="grid_2">
|
||||
<p>
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/split" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/split/" method="post">
|
||||
<table width=100%>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{% endif %}
|
||||
<h1>Stroke Data for workout</h1>
|
||||
|
||||
<form enctype="application/json" action="/rowers/api/workouts/{{ id }}/strokedata" method="post">
|
||||
<form enctype="application/json" action="/rowers/api/workouts/{{ id }}/strokedata/" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<p>
|
||||
See the how-to <a href="#howto">at the bottom of this page</a> for details on how to use this form.
|
||||
</p>
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals/" method="post">
|
||||
<table width=100%>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
@@ -73,7 +73,7 @@
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<h1>Updated Summary</h1>
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="{{ savebutton }}" value="{{ intervalstring }}">
|
||||
<input type="hidden" name="nrintervals" value={{ nrintervals }}>
|
||||
@@ -101,7 +101,7 @@
|
||||
<li class="grid_2">
|
||||
<h1>Detailed Summary Edit</h1>
|
||||
<p>This is still experimental and there are known bugs. Use at your own risk. Nothing is stored permanently until you hit Save in the Updated Summary section. You can use the restore original button to restore the original values.</p>
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/editintervals/" method="post">
|
||||
<table width=100%>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
|
||||
<p>Unless specified otherwise, the payments on the
|
||||
recurring payment plans are annual. The prices are specified
|
||||
as a price per year.
|
||||
as a price per year. You can downgrade or cancel your
|
||||
plan at any time in your <a href="/rowers/me/edit/">settings</a>.
|
||||
</p>
|
||||
|
||||
<table width="100%">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<a href="/rowers/upgrade">Change Upgrade</a>
|
||||
</li>
|
||||
<li class="grid_4">
|
||||
<form id="payment-form" method="post" action="/rowers/upgradecheckouts"
|
||||
<form id="payment-form" method="post" action="/rowers/upgradecheckouts/"
|
||||
autocomplete="off">
|
||||
<section>
|
||||
<label for="amount">
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</li>
|
||||
|
||||
<li class="grid_2 maxheight">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-boxplot/user/{{ theuser.id }}" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-boxplot/user/{{ theuser.id }}/" method="post">
|
||||
|
||||
{% if workouts %}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2 maxheight">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/user/{{ theuser.id }}" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/user/{{ theuser.id }}/" method="post">
|
||||
{% if workouts %}
|
||||
|
||||
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/comment" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/workout/{{ workout.id }}/comment/" method="post">
|
||||
<table width=100%>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="grid_2 maxheight">
|
||||
<form enctype="multipart/form-data" action="/rowers/workouts-join" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/workouts-join/" method="post">
|
||||
{% if workouts %}
|
||||
|
||||
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
||||
@@ -127,10 +127,10 @@
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
{% if team %}
|
||||
<form id="searchform" action="/rowers/workouts-join-select/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||
<form id="searchform" action="/rowers/workouts-join-select/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
||||
method="get" accept-charset="utf-8">
|
||||
{% else %}
|
||||
<form id="searchform" action="/rowers/workouts-join-select/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||
<form id="searchform" action="/rowers/workouts-join-select/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}/"
|
||||
method="get" accept-charset="utf-8">
|
||||
{% endif %}
|
||||
{{ searchform }}
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user