from django.db import models
from django.urls import reverse
class Event(models.Model):
date = models.DateField()
brekky = models.CharField(max_length=255, blank=True, null=True)
lunch = models.CharField(max_length=255, blank=True, null=True)
dinner = models.CharField(max_length=255, blank=True, null=True)
@property
def get_html_url(self):
url = reverse('cal:event_edit', args=(self.id,))
return f' {self.brekky or "-"}
{self.lunch or "-"}
{self.dinner or "-"} '