You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
515 B
19 lines
515 B
from django.db import models
|
|
from django.utils.timezone import now
|
|
|
|
class BaseModel(models.Model):
|
|
creation_date = models.DateTimeField(default=now, editable=False)
|
|
last_update = models.DateTimeField(default=now)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
def get_parent_reference(self):
|
|
"""Override in child models to provide parent reference"""
|
|
return None, None
|
|
|
|
class SideStoreModel(BaseModel):
|
|
store_id = models.CharField(max_length=100)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|