mirror of
				https://github.com/bspeice/itcs4180
				synced 2025-11-03 18:00:37 -05:00 
			
		
		
		
	Successful server startup
This commit is contained in:
		@ -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()
 | 
			
		||||
 | 
			
		||||
@ -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:
 | 
			
		||||
 | 
			
		||||
@ -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):
 | 
			
		||||
	'''
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user