Add: Description model to archive app
This commit is contained in:
parent
5bb94d7bc5
commit
5a3c568a15
1 changed files with 14 additions and 0 deletions
|
@ -33,3 +33,17 @@ class CategoryModel(models.Model):
|
||||||
return str(self.name)
|
return str(self.name)
|
||||||
else:
|
else:
|
||||||
return str(self.slug)
|
return str(self.slug)
|
||||||
|
|
||||||
|
|
||||||
|
class DescriptionModel(models.Model):
|
||||||
|
hash = models.CharField(max_length=128)
|
||||||
|
content = models.TextField()
|
||||||
|
date_modified = models.DateTimeField(auto_now=True, editable=True)
|
||||||
|
date_created = models.DateTimeField(auto_now_add=True, editable=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Description"
|
||||||
|
verbose_name_plural = "Descriptions"
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.hash)
|
||||||
|
|
Loading…
Add table
Reference in a new issue