from django.db import models
from django.contrib.auth.models import User

# Create your models here.
class Datakol(models.Model):
    owner = models.ForeignKey(User, on_delete=models.CASCADE)
    ph = models.DecimalField(max_digits=4,decimal_places=2)
    temp = models.DecimalField(max_digits=4, decimal_places=2)
    alat = models.BooleanField(default=False)
    upload_date = models.DateTimeField(auto_now_add=True)
    # class Meta:
    #   get_latest_by = 'upload_date'
    def __str__(self):
        return str(self.owner)
10d3d7055f30aa17a954316001cfd10cd00d1a87
<mask token>

<mask token>


class Datakol(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return str(self.owner)

<mask token>


class Datakol(models.Model):
    owner = models.ForeignKey(User, on_delete=models.CASCADE)
    ph = models.DecimalField(max_digits=4, decimal_places=2)
    temp = models.DecimalField(max_digits=4, decimal_places=2)
    alat = models.BooleanField(default=False)
    upload_date = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return str(self.owner)

from django.db import models
from django.contrib.auth.models import User


class Datakol(models.Model):
    owner = models.ForeignKey(User, on_delete=models.CASCADE)
    ph = models.DecimalField(max_digits=4, decimal_places=2)
    temp = models.DecimalField(max_digits=4, decimal_places=2)
    alat = models.BooleanField(default=False)
    upload_date = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return str(self.owner)

from django.db import models
from django.contrib.auth.models import User

# Create your models here.
class Datakol(models.Model):
    owner = models.ForeignKey(User, on_delete=models.CASCADE)
    ph = models.DecimalField(max_digits=4,decimal_places=2)
    temp = models.DecimalField(max_digits=4, decimal_places=2)
    alat = models.BooleanField(default=False)
    upload_date = models.DateTimeField(auto_now_add=True)
    # class Meta:
    #   get_latest_by = 'upload_date'
    def __str__(self):
        return str(self.owner)