From 6eb06f361508fc56c175f052e1fe243ed3e52375 Mon Sep 17 00:00:00 2001 From: Gena Date: Mon, 8 Jun 2015 19:05:47 +0600 Subject: [PATCH] no message --- store/admin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/store/admin.py b/store/admin.py index 1a86720..0acafe3 100644 --- a/store/admin.py +++ b/store/admin.py @@ -25,13 +25,14 @@ class BrandAdmin(admin.ModelAdmin): @admin.register(Category) class CategoryAdmin(admin.ModelAdmin): - def get_str(object): + def get_parent_str(object): return object.parent or '' - get_str.short_description = 'Родительская категория' - get_str.admin_order_field = 'parent__pk' + get_parent_str.short_description = 'Родительская категория' + get_parent_str.admin_order_field = 'parent__pk' - list_display = ('title', get_str,) + list_display = ('title', get_parent_str, 'priority') + list_editable = ('priority',) list_filter = ('parent', ) prepopulated_fields = {"slug": ("title",)}