1
0

ticket_list.py 367 B

1234567891011121314
  1. from django.contrib.auth.models import Group
  2. from django.db import models
  3. class TicketList(models.Model):
  4. name = models.CharField(max_length=128)
  5. group = models.ForeignKey(Group, on_delete=models.CASCADE)
  6. def __str__(self):
  7. return self.name
  8. class Meta:
  9. ordering = ["group__name", "name"]
  10. unique_together = ("group", "name")