1234567891011121314151617181920 |
- import textwrap
- from django.contrib.auth import get_user_model
- from django.db import models
- from tickets.models.ticket import Ticket
- class Event(models.Model):
- author = models.ForeignKey(
- get_user_model(), on_delete=models.CASCADE, blank=True, null=True,
- related_name="tickets_events"
- )
- ticket = models.ForeignKey(Ticket, on_delete=models.CASCADE)
- date = models.DateTimeField(auto_now_add=True)
- body = models.TextField(blank=True)
- def __str__(self):
- return self.body
|