from django.db import models from tinymce.models import HTMLField # Create your models here. class Calendar(models.Model): published = models.BooleanField('Kalendarz opublikowany', default=True) year = models.IntegerField('Rok', primary_key=True) content = HTMLField('Kalendarz', default='', blank=True) def __str__(self): return f'Kalendarz {self.year}' class Meta: verbose_name = 'Kalendarz' verbose_name_plural = 'Kalendarze' ordering = ['-year']