I have installed django-mptt and have followed the documentation regarding setting up a Django model for MPTT
However, I am getting the following ImportError:
from mptt.models import MPTTModel, TreeForeignKey
ImportError: cannot import name TreeForeignKey
Can anyone help?
Any advice appreciated.
Thanks.
TreeForeignKey is a class defined in the file fields.py. It looks like this file was just recently added to the code base for v0.5.pre.
If you are using version 0.4.2 or older, this file and class don't exist. I'm not sure how this package is intended to be used without this class, since the documentation only applies to the latest version of the code (v0.5.pre).
Good Luck!