remove unused imports, vairables and commented code
from views, and base cookbook and recipes modules
This commit is contained in:
@ -9,9 +9,9 @@ from django.views.generic import UpdateView
|
||||
from django.views.generic.edit import FormMixin
|
||||
|
||||
from cookbook.forms import CommentForm, ExternalRecipeForm, StorageForm, SyncForm
|
||||
from cookbook.helper.permission_helper import GroupRequiredMixin, OwnerRequiredMixin, group_required, above_space_limit
|
||||
from cookbook.models import (Comment, MealPlan, MealType, Recipe, RecipeImport, Storage, Sync,
|
||||
UserPreference)
|
||||
from cookbook.helper.permission_helper import (GroupRequiredMixin, OwnerRequiredMixin,
|
||||
above_space_limit, group_required)
|
||||
from cookbook.models import Comment, Recipe, RecipeImport, Storage, Sync
|
||||
from cookbook.provider.dropbox import Dropbox
|
||||
from cookbook.provider.local import Local
|
||||
from cookbook.provider.nextcloud import Nextcloud
|
||||
@ -74,40 +74,6 @@ class SyncUpdate(GroupRequiredMixin, UpdateView, SpaceFormMixing):
|
||||
return context
|
||||
|
||||
|
||||
# class KeywordUpdate(GroupRequiredMixin, UpdateView):
|
||||
# groups_required = ['user']
|
||||
# template_name = "generic/edit_template.html"
|
||||
# model = Keyword
|
||||
# form_class = KeywordForm
|
||||
|
||||
# # TODO add msg box
|
||||
|
||||
# def get_success_url(self):
|
||||
# return reverse('list_keyword')
|
||||
|
||||
# def get_context_data(self, **kwargs):
|
||||
# context = super().get_context_data(**kwargs)
|
||||
# context['title'] = _("Keyword")
|
||||
# return context
|
||||
|
||||
|
||||
# class FoodUpdate(GroupRequiredMixin, UpdateView, SpaceFormMixing):
|
||||
# groups_required = ['user']
|
||||
# template_name = "generic/edit_template.html"
|
||||
# model = Food
|
||||
# form_class = FoodForm
|
||||
|
||||
# # TODO add msg box
|
||||
|
||||
# def get_success_url(self):
|
||||
# return reverse('edit_food', kwargs={'pk': self.object.pk})
|
||||
|
||||
# def get_context_data(self, **kwargs):
|
||||
# context = super(FoodUpdate, self).get_context_data(**kwargs)
|
||||
# context['title'] = _("Food")
|
||||
# return context
|
||||
|
||||
|
||||
@group_required('admin')
|
||||
def edit_storage(request, pk):
|
||||
instance = get_object_or_404(Storage, pk=pk, space=request.space)
|
||||
|
Reference in New Issue
Block a user