basic local recipes

This commit is contained in:
vabene1111
2019-11-13 22:38:43 +01:00
parent b98f87499a
commit b54da49858
9 changed files with 122 additions and 9 deletions

View File

@ -6,14 +6,14 @@ from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import CreateView
from cookbook.forms import ImportRecipeForm, RecipeImport, KeywordForm, Storage, StorageForm
from cookbook.forms import ImportRecipeForm, RecipeImport, KeywordForm, Storage, StorageForm, InternalRecipeForm
from cookbook.models import Keyword, Recipe
class RecipeCreate(LoginRequiredMixin, CreateView): # this exists for completeness but is not in use at the moment
class RecipeCreate(LoginRequiredMixin, CreateView):
template_name = "generic/new_template.html"
model = Recipe
fields = ['name', 'keywords']
form_class = InternalRecipeForm
success_url = reverse_lazy('index')
def get_context_data(self, **kwargs):