finish removing the category from example proposals

This commit is contained in:
Luke Hatcher 2012-10-31 14:56:21 -04:00
parent cabae1394d
commit 6c8f727ef2
2 changed files with 3 additions and 14 deletions

View file

@ -1,10 +1,8 @@
from django.contrib import admin
from symposion_project.proposals.models import ProposalCategory, TalkProposal, TutorialProposal, PosterProposal
from symposion_project.proposals.models import TalkProposal, TutorialProposal, PosterProposal
admin.site.register(ProposalCategory,
prepopulated_fields = {"slug": ("name",)},
)
admin.site.register(TalkProposal)
admin.site.register(TutorialProposal)
admin.site.register(PosterProposal)

View file

@ -2,17 +2,11 @@ from django import forms
from markitup.widgets import MarkItUpWidget
from symposion_project.proposals.models import ProposalCategory, TalkProposal, TutorialProposal, PosterProposal
from symposion_project.proposals.models import TalkProposal, TutorialProposal, PosterProposal
class ProposalForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(ProposalForm, self).__init__(*args, **kwargs)
self.fields["category"] = forms.ModelChoiceField(
queryset = ProposalCategory.objects.order_by("name")
)
def clean_description(self):
value = self.cleaned_data["description"]
if len(value) > 400:
@ -28,7 +22,6 @@ class TalkProposalForm(ProposalForm):
model = TalkProposal
fields = [
"title",
"category",
"audience_level",
"description",
"abstract",
@ -47,7 +40,6 @@ class TutorialProposalForm(ProposalForm):
model = TutorialProposal
fields = [
"title",
"category",
"audience_level",
"description",
"abstract",
@ -67,7 +59,6 @@ class PosterProposalForm(ProposalForm):
model = PosterProposal
fields = [
"title",
"category",
"audience_level",
"description",
"abstract",