createt new tabel for tags
This commit is contained in:
parent
c056e6880f
commit
bdd286915d
14 changed files with 7 additions and 120 deletions
|
@ -28,6 +28,7 @@ class Item(SoftDeleteModel):
|
|||
returned_at = models.DateTimeField(blank=True, null=True)
|
||||
created_at = models.DateTimeField(null=True, auto_now_add=True)
|
||||
updated_at = models.DateTimeField(blank=True, null=True)
|
||||
tags = models.ManyToManyField('Tag')
|
||||
|
||||
@property
|
||||
def container(self):
|
||||
|
@ -98,6 +99,12 @@ class Comment(models.Model):
|
|||
def __str__(self):
|
||||
return str(self.item) + ' comment #' + str(self.id)
|
||||
|
||||
class Tag(models.Model):
|
||||
slug = models.TextField()
|
||||
|
||||
def __str__(self):
|
||||
return self.slug
|
||||
|
||||
|
||||
class Event(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue