added userspace admin
This commit is contained in:
parent
da09602834
commit
b78d0ec30b
@ -15,7 +15,7 @@ from .models import (BookmarkletImport, Comment, CookLog, Food, FoodInheritField
|
|||||||
Recipe, RecipeBook, RecipeBookEntry, RecipeImport, SearchPreference, ShareLink,
|
Recipe, RecipeBook, RecipeBookEntry, RecipeImport, SearchPreference, ShareLink,
|
||||||
ShoppingList, ShoppingListEntry, ShoppingListRecipe, Space, Step, Storage,
|
ShoppingList, ShoppingListEntry, ShoppingListRecipe, Space, Step, Storage,
|
||||||
Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync, SyncLog,
|
Supermarket, SupermarketCategory, SupermarketCategoryRelation, Sync, SyncLog,
|
||||||
TelegramBot, Unit, UserFile, UserPreference, ViewLog, Automation)
|
TelegramBot, Unit, UserFile, UserPreference, ViewLog, Automation, UserSpace)
|
||||||
|
|
||||||
|
|
||||||
class CustomUserAdmin(UserAdmin):
|
class CustomUserAdmin(UserAdmin):
|
||||||
@ -46,6 +46,14 @@ class SpaceAdmin(admin.ModelAdmin):
|
|||||||
admin.site.register(Space, SpaceAdmin)
|
admin.site.register(Space, SpaceAdmin)
|
||||||
|
|
||||||
|
|
||||||
|
class UserSpaceAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('user', 'space',)
|
||||||
|
search_fields = ('user', 'space',)
|
||||||
|
|
||||||
|
|
||||||
|
admin.site.register(UserSpace, UserSpaceAdmin)
|
||||||
|
|
||||||
|
|
||||||
class UserPreferenceAdmin(admin.ModelAdmin):
|
class UserPreferenceAdmin(admin.ModelAdmin):
|
||||||
list_display = ('name', 'theme', 'nav_color', 'default_page',)
|
list_display = ('name', 'theme', 'nav_color', 'default_page',)
|
||||||
search_fields = ('user__username',)
|
search_fields = ('user__username',)
|
||||||
|
Loading…
Reference in New Issue
Block a user