I want to create an API endpoint for daily temperatures.(highest and lowest 
tempereture of a day).

3 Ocak 2017 Salı 13:06:03 UTC+3 tarihinde Marco Silva yazdı:
>
> What exactly do you need help in?
>
>
> segunda-feira, 2 de Janeiro de 2017 às 22:16:24 UTC, Burak Özdemir 
> escreveu:
>>
>> My sensor measures the temperature value every 5 seconds and records it 
>> to the database. I want to see the highest and lowest temperature of every 
>> recorded day via API. It should be like that(for instance, values are not 
>> correct):  
>> <https://lh3.googleusercontent.com/-ta6cWLUqDWg/WGrQvWjjx4I/AAAAAAAAAlI/owg-mW2gUggSyLBjJM1PaO2HV7Uodo-7ACLcB/s1600/aCLFW.png>
>>
>> The modal:
>>
>> class SensorModel(models.Model):
>>     measurementTime = models.DateTimeField()
>>     ldr = models.IntegerField()
>>     temperature = models.IntegerField()
>>     humidity = models.IntegerField()
>>
>> class Meta:
>>     ordering = ['measurementTime']
>>
>> def __unicode__(self):
>>     return str(self.id)
>>
>>
>>
>> Database:
>>
>> <https://lh3.googleusercontent.com/-T0vWDvxz4o0/WGrQ7VkFUXI/AAAAAAAAAlM/N66JCp7aDx0uipzPiY2o6vud0eM0ff8eACLcB/s1600/U4tl7.png>
>>
>> Current API: 
>>
>> <https://lh3.googleusercontent.com/-alR7rpm_vc4/WGrREkQNZ7I/AAAAAAAAAlQ/vfkQcNAl7Q0BWMJ0qI0FNZl-_Y7lSyHIACLcB/s1600/wRbUN.png>
>>
>> Thanks in advance.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to