pdlzbs/core/models.py

20 lines
601 B
Python

from django.db import models
from tinymce.models import HTMLField
from admin_ordering.models import OrderableModel
from core.utils import SingletonModel
# Create your models here.
class Button(OrderableModel):
title = models.CharField('Tekst na przycisku', max_length=50)
href = models.CharField('Link', max_length=50)
blank = models.BooleanField('Otwórz w nowej karcie')
def __str__(self):
return self.title or '-'
class Meta(OrderableModel.Meta):
verbose_name = 'Przycisk na stronie głównej'
verbose_name_plural = 'Przyciski na stronie głównej'