12 lines
422 B
Python
12 lines
422 B
Python
from django.db import models
|
|
|
|
# Create your models here.
|
|
class WeatherStats(models.Model):
|
|
humidity_air = models.FloatField(default=0)
|
|
humidity_ground = models.FloatField(default=0)
|
|
temperature = models.FloatField(default=0)
|
|
light = models.FloatField(default=0)
|
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
|
|
def __str__(self):
|
|
return 'Weather data by ' + str(self.created_at) |