basic local recipes
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user