mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
improved stats page
This commit is contained in:
@@ -21,6 +21,10 @@
|
|||||||
class="badge badge-pill badge-info">{{ counts.recipes }}</span></li>
|
class="badge badge-pill badge-info">{{ counts.recipes }}</span></li>
|
||||||
<li class="list-group-item">{% trans 'Keywords' %} : <span
|
<li class="list-group-item">{% trans 'Keywords' %} : <span
|
||||||
class="badge badge-pill badge-info">{{ counts.keywords }}</span></li>
|
class="badge badge-pill badge-info">{{ counts.keywords }}</span></li>
|
||||||
|
<li class="list-group-item">{% trans 'Units' %} : <span
|
||||||
|
class="badge badge-pill badge-info">{{ counts.units }}</span></li>
|
||||||
|
<li class="list-group-item">{% trans 'Ingredients' %} : <span
|
||||||
|
class="badge badge-pill badge-info">{{ counts.ingredients }}</span></li>
|
||||||
<li class="list-group-item">{% trans 'Recipe Imports' %} : <span
|
<li class="list-group-item">{% trans 'Recipe Imports' %} : <span
|
||||||
class="badge badge-pill badge-info">{{ counts.recipe_import }}</span></li>
|
class="badge badge-pill badge-info">{{ counts.recipe_import }}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -34,7 +38,12 @@
|
|||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item">{% trans 'Recipes without Keywords' %} : <span
|
<li class="list-group-item">{% trans 'Recipes without Keywords' %} : <span
|
||||||
class="badge badge-pill badge-info">{{ counts.recipes_no_keyword}}</span></li>
|
class="badge badge-pill badge-info">{{ counts.recipes_no_keyword}}</span></li>
|
||||||
|
<li class="list-group-item">{% trans 'External Recipes' %} : <span
|
||||||
|
class="badge badge-pill badge-info">{{ counts.recipes_external }}</span></li>
|
||||||
|
<li class="list-group-item">{% trans 'Internal Recipes' %} : <span
|
||||||
|
class="badge badge-pill badge-info">{{ counts.recipes_internal }}</span></li>
|
||||||
|
<li class="list-group-item">{% trans 'Comments' %} : <span
|
||||||
|
class="badge badge-pill badge-info">{{ counts.comments }}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -93,6 +93,12 @@ def statistics(request):
|
|||||||
counts.recipes = Recipe.objects.count()
|
counts.recipes = Recipe.objects.count()
|
||||||
counts.keywords = Keyword.objects.count()
|
counts.keywords = Keyword.objects.count()
|
||||||
counts.recipe_import = RecipeImport.objects.count()
|
counts.recipe_import = RecipeImport.objects.count()
|
||||||
|
counts.units = Unit.objects.count()
|
||||||
|
counts.ingredients = Ingredient.objects.count()
|
||||||
|
counts.comments = Comment.objects.count()
|
||||||
|
|
||||||
|
counts.recipes_internal = Recipe.objects.filter(internal=True).count()
|
||||||
|
counts.recipes_external = counts.recipes - counts.recipes_internal
|
||||||
|
|
||||||
counts.recipes_no_keyword = Recipe.objects.filter(keywords=None).count()
|
counts.recipes_no_keyword = Recipe.objects.filter(keywords=None).count()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user