storage backend reworked

This commit is contained in:
vabene1111
2018-05-25 16:49:10 +02:00
parent c5986c6e7f
commit 4871b6194c
21 changed files with 278 additions and 128 deletions

View File

@ -4,8 +4,8 @@ from django.shortcuts import render
from django_tables2 import RequestConfig
from django.utils.translation import gettext as _
from cookbook.models import Category, Keyword, SyncLog, RecipeImport
from cookbook.tables import CategoryTable, KeywordTable, ImportLogTable, RecipeImportTable
from cookbook.models import Category, Keyword, SyncLog, RecipeImport, Storage
from cookbook.tables import CategoryTable, KeywordTable, ImportLogTable, RecipeImportTable, StorageTable
@login_required
@ -38,3 +38,11 @@ def recipe_import(request):
RequestConfig(request, paginate={'per_page': 25}).configure(table)
return render(request, 'generic/list_template.html', {'title': _("Import"), 'table': table})
@login_required
def storage(request):
table = StorageTable(Storage.objects.all())
RequestConfig(request, paginate={'per_page': 25}).configure(table)
return render(request, 'generic/list_template.html', {'title': _("Storage Backend"), 'table': table})