2021-02-24 20:13:54 -08:00
|
|
|
from .models import Feed, Episode
|
|
|
|
from django import forms
|
|
|
|
|
|
|
|
|
|
|
|
class FeedForm(forms.ModelForm):
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = Feed
|
|
|
|
fields = [
|
2021-03-16 11:22:44 -07:00
|
|
|
'title', 'author', 'description',
|
|
|
|
'image_title', 'image_attribution', 'image_attribution_url',
|
|
|
|
'original_image_url', 'image_license',
|
|
|
|
'image_license_jurisdiction', 'image'
|
2021-02-24 20:13:54 -08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
class EpisodeForm(forms.ModelForm):
|
|
|
|
|
|
|
|
pub_date = forms.DateField(
|
|
|
|
widget=forms.TextInput(attrs={'type': 'date'})
|
|
|
|
)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = Episode
|
|
|
|
fields = [
|
2021-03-16 11:22:44 -07:00
|
|
|
'title', 'author', 'pub_date', 'episode_number',
|
2021-03-16 14:43:22 -07:00
|
|
|
'description', 'mp3',
|
|
|
|
'image_title', 'image_attribution', 'image_attribution_url',
|
|
|
|
'original_image_url', 'image_license',
|
|
|
|
'image_license_jurisdiction', 'image'
|
2021-02-24 20:13:54 -08:00
|
|
|
]
|