mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2024-11-14 22:31:31 -08:00
25 lines
508 B
Python
25 lines
508 B
Python
|
from .models import Feed, Episode
|
||
|
from django import forms
|
||
|
|
||
|
|
||
|
class FeedForm(forms.ModelForm):
|
||
|
|
||
|
class Meta:
|
||
|
model = Feed
|
||
|
fields = [
|
||
|
'title', 'author', 'description', 'image'
|
||
|
]
|
||
|
|
||
|
|
||
|
class EpisodeForm(forms.ModelForm):
|
||
|
|
||
|
pub_date = forms.DateField(
|
||
|
widget=forms.TextInput(attrs={'type': 'date'})
|
||
|
)
|
||
|
|
||
|
class Meta:
|
||
|
model = Episode
|
||
|
fields = [
|
||
|
'title', 'author', 'pub_date', 'episode_number', 'description', 'image', 'mp3'
|
||
|
]
|