1
0
mirror of https://github.com/bspeice/itcs4180 synced 2025-07-03 14:55:11 -04:00

Successful server startup

This commit is contained in:
Bradlee Speice
2014-04-05 16:58:42 -04:00
parent 6769e75c9c
commit 44edb4e848
6 changed files with 8 additions and 161 deletions

View File

@ -7,6 +7,6 @@ class Location(models.Model):
riddle = models.CharField(max_length=512)
riddle_image_url = models.URLField()
location_long = models.DecimalField()
location_lat = models.DecimalField()
location_long = models.DecimalField(max_digits=10, decimal_places=7)
location_lat = models.DecimalField(max_digits=10, decimal_places=7)
result = models.TextField()

View File

@ -5,7 +5,7 @@ from models import Location
class LocationListSerializer(ModelSerializer):
class Meta:
model = Location
fields = ('id', 'name', 'riddle', 'location')
fields = ('id', 'name', 'riddle', 'location_long', 'location_lat')
class LocationResultSerializer(ModelSerializer):
class Meta:

View File

@ -12,7 +12,7 @@ class LocationList(APIView):
def get(self, request, format=None):
locations = Location.objects.all()
locations_serializer = LocationListSerializer(locations, many=True)
return Response(serializer.data)
return Response(locations_serializer.data)
class LocationResult(APIView):
'''