finish removing the category from example proposals
This commit is contained in:
parent
cabae1394d
commit
6c8f727ef2
2 changed files with 3 additions and 14 deletions
|
@ -1,10 +1,8 @@
|
||||||
from django.contrib import admin
|
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(TalkProposal)
|
||||||
admin.site.register(TutorialProposal)
|
admin.site.register(TutorialProposal)
|
||||||
admin.site.register(PosterProposal)
|
admin.site.register(PosterProposal)
|
||||||
|
|
|
@ -2,17 +2,11 @@ from django import forms
|
||||||
|
|
||||||
from markitup.widgets import MarkItUpWidget
|
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):
|
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):
|
def clean_description(self):
|
||||||
value = self.cleaned_data["description"]
|
value = self.cleaned_data["description"]
|
||||||
if len(value) > 400:
|
if len(value) > 400:
|
||||||
|
@ -28,7 +22,6 @@ class TalkProposalForm(ProposalForm):
|
||||||
model = TalkProposal
|
model = TalkProposal
|
||||||
fields = [
|
fields = [
|
||||||
"title",
|
"title",
|
||||||
"category",
|
|
||||||
"audience_level",
|
"audience_level",
|
||||||
"description",
|
"description",
|
||||||
"abstract",
|
"abstract",
|
||||||
|
@ -47,7 +40,6 @@ class TutorialProposalForm(ProposalForm):
|
||||||
model = TutorialProposal
|
model = TutorialProposal
|
||||||
fields = [
|
fields = [
|
||||||
"title",
|
"title",
|
||||||
"category",
|
|
||||||
"audience_level",
|
"audience_level",
|
||||||
"description",
|
"description",
|
||||||
"abstract",
|
"abstract",
|
||||||
|
@ -67,7 +59,6 @@ class PosterProposalForm(ProposalForm):
|
||||||
model = PosterProposal
|
model = PosterProposal
|
||||||
fields = [
|
fields = [
|
||||||
"title",
|
"title",
|
||||||
"category",
|
|
||||||
"audience_level",
|
"audience_level",
|
||||||
"description",
|
"description",
|
||||||
"abstract",
|
"abstract",
|
||||||
|
|
Loading…
Reference in a new issue