Private
Public Access
1
0

Merge branch 'feature/partnerpage' into develop

This commit is contained in:
Sander Roosendaal
2017-03-29 11:22:58 +02:00
6 changed files with 108 additions and 7 deletions
+1
View File
@@ -18,6 +18,7 @@
# Emacs temp files
*.*~
\#*
# database
*.sqlite3
+19 -5
View File
@@ -36,7 +36,21 @@
{% endif %}
</div>
<div class="grid_10 omega">
<div class="grid_8 alpha"><p>&nbsp</p></div>
<div class="grid_8 alpha">
<div class="grid_1 prefix_4 alpha">
<p id="header">
<a class="button gray small" href="/rowers/videos">Videos</a></p>
</div>
<div class="grid_2">
<p id="header">
<a class="button gray small" href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
</div>
<div class="grid_1 omega">
<p id="header">
<a class="button gray small" href="/rowers/email">Contact</a></p>
</div>
</div>
<div class="grid_2 omega">
{% if user.is_authenticated %}
<p><a class="button gray small" href="/password_change/">Password Change</a></p>
@@ -189,14 +203,14 @@
<p id="footer">
<a href="/rowers/legal">Legal</a></p>
</div>
<div class="grid_2">
<p id="footer">
<a href="/rowers/partners">Partners</a></p>
</div>
<div class="grid_1">
<p id="footer">
<a href="/rowers/physics">Physics</a></p>
</div>
<div class="grid_2">
<p id="footer">
<a href="/rowers/videos">Videos</a></p>
</div>
<div class="grid_2">
<p id="footer">
<a href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
+75
View File
@@ -0,0 +1,75 @@
{% extends "base.html" %}
{% block title %}About us{% endblock title %}
{% block content %}
<div class="grid_6 alpha">
<h2>Are you interested in partnering with Rowsandall.com?</h2>
<p>We are open to working together with partners serving the rowing
community. To maintain maximum transparency to our users, we have
the following principles for collaboration:</p>
<ol>
<li>On blog.rowsandall.com, analytics.rowsandall.com and in through
our Twitter account, we write about hardware, software, and other
rowing related kit that we have used, tested, and are enthusiastic about. </li>
<li>If you send us a unit, or a piece of software to test, we will not
write a public review about it. If we like the unit (software, etc) and
keep using it, you may see it appear in our blog posts. If there are
reasons why we are not satisfied with the unit, but we feel that
an improved version would serve the rowing community, we will contact
you with constructive criticism. We will do our best not to mention
your product in
a negative way on our public blogs or twitter. However, we retain the
freedom to engage in online discussions about your product, but will
try to keep our communication factual.</li>
<li>We encourage vendors to send us their products for testing. We are
especially interested in software and hardware used for indoor and
on-the-water rowing. We want to avoid the hassle of sending back
your products, so we will not send back any item that has a value of
less than 1000 EURO. If you want us to test an item of higher value,
please mention this when you contact us.</li>
</ol>
</div>
<div class="grid_6 omega">
<h2>Examples of possible partnerships</h2>
<p>
We currently envision a couple of ways in which we can partner with
your business. We are open for other models. If you have an interesting
proposition or want to use one of the partnership models listed below,
please contact us by email.
<ol>
<li>Sponsorship of Pro membership.
You distribute coupon codes giving right to a year of
Pro membership to the receiver of the coupon. The coupon can be
redeemed on this website by the user. He or she will get a year of
Pro membership sponsored by you. Rowsandall.com will send you a
regular invoice based on the number of redeemed coupons. </li>
<li>Purchasing blocks of Pro membership coupons.
This is similar to the above, except that you pay in advance (at
a reduced rate) a "block" of Pro membership coupons.</li>
<li>Advertising. If you decide to support rowsandall.com through
advertising, we will create a top banner where you as a sponsor
have space to put up a clickable picture. Price and content open
for negotiation.</li>
<li>Collaboration on prototypes or beta versions of your new products
(or product upgrades). You send us a product ahead of release (under
a confidentiality agreement) and we use it and provide feedback.
We will make no public comments or posts about the product, nor
would we inform anyone else.</li>
<li>Long term product feedback. Typically in the product design phase.
We would act as a sounding board for ideas, could provide feedback
on the data related features of the product. We would charge for our
time according to an agreed price.</li>
</lo>
</p>
</div>
{% endblock content %}
+8
View File
@@ -1,4 +1,6 @@
from django.test import TestCase, Client,override_settings
from django.core.management import call_command
from django.utils.six import StringIO
from django.test.client import RequestFactory
from .views import checkworkoutuser,c2_open
from rowers.models import Workout, User, Rower, WorkoutForm,RowerForm,GraphImage
@@ -43,6 +45,12 @@ class DjangoTestCase(TestCase, MockTestCase):
# Create your tests here.
class EmailProcessTest(TestCase):
def test_emailprocessing(self):
out = StringIO()
call_command('processemail', stdout=out)
self.assertIn('Successfully processed email attachments',out.getvalue())
class C2Objects(DjangoTestCase):
def test_strokedata(self):
with open('rowers/testdata/c2stroketestdata.txt','r') as infile:
+1
View File
@@ -194,6 +194,7 @@ urlpatterns = [
url(r'^workout/fusion/(?P<id>\d+)/(?P<startdatestring>\d+-\d+-\d+)/(?P<enddatestring>\w+.*)$',views.workout_fusion_list),
url(r'^physics$',TemplateView.as_view(template_name='physics.html'),name='physics'),
url(r'^partners$',TemplateView.as_view(template_name='partners.html'),name='partners'),
url(r'^workout/(\d+)/$',views.workout_view),
url(r'^workout/(\d+)/addtimeplot$',views.workout_add_timeplot_view),
url(r'^workout/(\d+)/addpiechart$',views.workout_add_piechart_view),
+4 -2
View File
@@ -5215,17 +5215,19 @@ def workout_upload_view(request,message="",
except C2NoTokenError:
return HttpResponseRedirect("/rowers/me/c2authorize/")
try:
c2userid = c2stuff.get_userid(thetoken)
if not c2userid:
return HttpResponseRedirect("/rowers/me/c2authorize")
data = c2stuff.createc2workoutdata(w)
authorizationstring = str('Bearer ' + thetoken)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
import urllib
import urllib
url = "https://log.concept2.com/api/users/%s/results" % (c2userid)
response = requests.post(url,headers=headers,data=json.dumps(data))
# response = c2stuff.workout_c2_upload(request.user,w)
# response = c2stuff.workout_c2_upload(request.user,w)
if (response.status_code != 201 and response.status_code != 200):
if settings.DEBUG:
return HttpResponse(response)