Add parent back to categories
This commit is contained in:
parent
83937b4103
commit
a3273c13cf
5 changed files with 108 additions and 23 deletions
|
@ -6,6 +6,7 @@ from django.forms import ModelForm
|
|||
class Category(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=64)
|
||||
parent = models.ForeignKey("self", on_delete=models.SET_NULL, blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue