Add option to space to enable plural name usage

* Add option to space to enable usage of plural name
  for food and unit per space

* Respect option per space to use the plural name
This commit is contained in:
Niklas Schwarz
2022-09-11 22:45:18 +02:00
parent 9994b6f9c2
commit b1ad5ef205
40 changed files with 193 additions and 83 deletions

View File

@ -36,7 +36,7 @@ def delete_space_action(modeladmin, request, queryset):
class SpaceAdmin(admin.ModelAdmin):
list_display = ('name', 'created_by', 'max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
list_display = ('name', 'created_by', 'max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing', 'use_plural')
search_fields = ('name', 'created_by__username')
list_filter = ('max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
date_hierarchy = 'created_at'