Private
Public Access
1
0

Oauth2 provider and initial api

This commit is contained in:
Sander Roosendaal
2016-11-20 14:46:46 +01:00
parent 60edc3f3c2
commit d57ecb495b
6 changed files with 89 additions and 4611 deletions

36
rowers/serializers.py Normal file
View File

@@ -0,0 +1,36 @@
from rest_framework import serializers
from rowers.models import Workout,Rower
# Serializers define the API representation.
class RowerSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Rower
fields = (
'weightcategory',
)
class WorkoutSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Workout
fields = (
'id',
'name',
'date',
'workouttype',
'boattype',
'starttime',
'startdatetime',
'distance',
'duration',
'weightcategory',
'weightvalue',
'averagehr',
'maxhr',
'notes',
'summary',
'csvfilename',
)