diff --git a/cookbook/forms.py b/cookbook/forms.py index 6f934318e..943a50990 100644 --- a/cookbook/forms.py +++ b/cookbook/forms.py @@ -4,9 +4,6 @@ from django.utils.translation import gettext as _ from django import forms from .models import * -# noinspection PyPackageRequirements -from dal import autocomplete - class RecipeForm(forms.ModelForm): class Meta: @@ -19,10 +16,6 @@ class RecipeForm(forms.ModelForm): 'keywords': _('Keywords'), } - help_texts = { - 'keywords': _('Ctrl+Click to select multiple keywords'), - } - def __init__(self, *args, **kwargs): super(RecipeForm, self).__init__(*args, **kwargs) self.helper = FormHelper() @@ -30,40 +23,6 @@ class RecipeForm(forms.ModelForm): self.helper.add_input(Submit('save', _('Save'), css_class='btn-primary')) -class CategoryForm(forms.ModelForm): - class Meta: - model = Category - fields = ('name', 'description') - - labels = { - 'name': _('Name'), - 'description': _('Description'), - } - - def __init__(self, *args, **kwargs): - super(CategoryForm, self).__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.form_method = 'post' - self.helper.add_input(Submit('save', _('Save'), css_class='btn-primary')) - - -class KeywordForm(forms.ModelForm): - class Meta: - model = Keyword - fields = ('name', 'description') - - labels = { - 'name': _('Name'), - 'description': _('Description'), - } - - def __init__(self, *args, **kwargs): - super(KeywordForm, self).__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.form_method = 'post' - self.helper.add_input(Submit('save', _('Save'), css_class='btn-primary')) - - class EditRecipeForm(forms.ModelForm): class Meta: model = Recipe diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index dc5b6bd6f..4d938f30d 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -53,8 +53,8 @@ {% trans 'New' %}