[Fixed]-Getting abstract class static field value

1👍

You can simply:

class Timestamp(models.Model):
    created_at = models.DateTimeField(auto_add=True)
    updated_at = models.DateTimeField(auto_add_now=True)

    class Meta:
        abstract = True


class Node(Timestamp):
    latitude = models.FloatField(default=0.0)
    longitude = models.FloatField(default=0.0)
👤McAbra

Leave a comment