X-Git-Url: https://git.0d.be/?p=django-panik-combo.git;a=blobdiff_plain;f=panikombo%2Fforms.py;h=d7a20a6fe0d7092973ae6e95f53995742cb16054;hp=d9f60ec328c9afbfd9ddaa4834a0abfac0de2512;hb=efe26dec17e20d9e10317a12a6e8aaf2b7732345;hpb=277ee6872b2a5fad98f9fe5e9745102b21b623b8 diff --git a/panikombo/forms.py b/panikombo/forms.py index d9f60ec..d7a20a6 100644 --- a/panikombo/forms.py +++ b/panikombo/forms.py @@ -4,7 +4,8 @@ from taggit.forms import TagWidget from emissions.models import SoundFile, Episode -from .models import SoundCell, EpisodeCell, EpisodeAutoSelectionCell +from .models import (SoundCell, EpisodeCell, EpisodeAutoSelectionCell, + NewsItemAutoSelectionCell, Topik) from .views import soundfiles, episodes class SoundFileWidget(HeavySelect2Widget): @@ -52,3 +53,16 @@ class EpisodeAutoSelectionCellForm(forms.ModelForm): model = EpisodeAutoSelectionCell fields = ('title', 'tags', 'category') widgets = {'tags': TagWidget()} + + +class NewsItemAutoSelectionCellForm(forms.ModelForm): + class Meta: + model = NewsItemAutoSelectionCell + fields = ('title', 'tags', 'future') + widgets = {'tags': TagWidget()} + + +class TopikEditForm(forms.ModelForm): + class Meta: + model = Topik + fields = ('image',)