| Name | jasondgoth |
|---|---|
| Email Address | n/a |
| Posts | 1 |
-
- 2010-07-29 18:42:51
- EasyTree in Admin
- Board >> Django Standard Library >> Admin
- I am using easytree to create a hierarchy of topics for articles - something along the lines of this:
>>> class Topic(BaseEasyTree):
>>> name = models.CharField(max_length=256)
>>> objects = EasyTreeManager()
>>> class Article(models.Model):
>>> title = models.CharField(max_length=256)
>>> topic = models.ForeignKey(Topic)
I created a TopicAdmin and using Easytree:
>>> class TopicAdmin(EasyTreeAdmin):
>>> pass
>>> admin.site.register(Topic, TopicAdmin)
The admin section for Topics works great. The problem is with ArticleAdmin - it shows the list of topics with no hierarchy. I know I must customize the Admin form field for the Topic in the ArticleAdmin - I just do not see a way to do this with formfield_overrides.
Does anyone know how to do this?
My apologies if this is the wrong place for this post. I could not find a django-easytree support forum.


