Add initial models for Category and Topic
This commit is contained in:
parent
ba69749cc5
commit
ba094c8130
1 changed files with 10 additions and 0 deletions
|
@ -198,3 +198,13 @@ class Member(models.Model):
|
|||
|
||||
def __str__(self):
|
||||
return '%s in %s' % (self.user, self.team)
|
||||
|
||||
class Category(models.Model):
|
||||
name = models.CharField(max_length=256)
|
||||
description = models.TextField()
|
||||
img = models.URLField(blank=False, null=False)
|
||||
|
||||
class Topic(models.Model):
|
||||
category = models.ForeignKey(Category, on_delete=models.CASCADE, null=False, blank=False)
|
||||
name = models.CharField(max_length=256)
|
||||
description = models.TextField()
|
||||
|
|
Loading…
Reference in a new issue