27 lines
761 B
Python
27 lines
761 B
Python
from django import forms
|
|
from LandingPage.models import Submission, Season, Episode, Ban, User
|
|
|
|
class SubmissionForm(forms.ModelForm):
|
|
class Meta():
|
|
model = Submission
|
|
fields = ('url','tags',)
|
|
help_texts = {
|
|
'url': 'URL to your episode',
|
|
'tags': 'Describe your link. Comma-separated list of keywords'
|
|
}
|
|
|
|
class SeasonForm(forms.ModelForm):
|
|
class Meta():
|
|
model = Season
|
|
fields = ('name','number','description','artwork',)
|
|
|
|
class EpisodeForm(forms.ModelForm):
|
|
class Meta():
|
|
model = Episode
|
|
fields = ('episode','name','summary','airdate',)
|
|
|
|
class BanForm(forms.ModelForm):
|
|
class Meta():
|
|
model = Ban
|
|
fields = ('reason','expiration','permanent',)
|