Hey, I have just installed the django-mptt lib, but i don't know how to get it to work :(
I have added
from mptt.models import MPTTModel
class Category(MPTTModel):
slug = models.SlugField(max_length=200, unique=True)
name = models.CharField(max_length=100)
parent = models.ForeignKey('self', blank=True, null=True, related_name='child')
It that works fine
-
But when i go to the Django Admin page of my site i got an error:
TemplateDoesNotExist at /admin/search/category/
admin/mptt_change_list.html
I managed to get the same error (0.5.5). You also have to add 'django_mptt_admin' to INSTALLED_APPS.
Phillip.
pip install django-mptt --upgrade
solved the problem for me. There is a closed issue about this here: https://github.com/django-mptt/django-mptt/issues/23In settings.py from Django 1.4, TEMPLATE_LOADERS had eggs.Loader commented out by default.
Uncommenting eggs.Loader allowed the four admin templates stored in
to be found.
Googling this error message brought me here.
In my case solution was to simply add 'mptt' to INSTALLED_APPS for template loader to find admin/mptt_change_list.html
Had the same problem whith mptt installed with easy_install. Had to force unzipping:
easy_install --always-unzip django-mptt-0.5.5.tar.gz