开发者

Django mptt admin category

I am using the basic configuration for Django Mptt Admin

from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from teklifpark.categories.models import Category

admin.site.register(Category, MPTTModelAdmin)

But in the admin panel I cannot view c开发者_开发百科ategory names. I can create but while choosing the parent category in the drop down box I can only view Category Object instead of name of the category how can I fix it.


I'm sure that you didn't added

def __unicode__(self):
    return u'%s' % self.title

in your Category class


I saw on the #django channel a similar question to yours take a look here http://django-irc-logs.com/2011/jul/13/#52263

hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜