[Answer]-Django-mptt form "Attribute error"

1👍

I don’t understand why in docs (http://django-mptt.github.io/django-mptt/forms.html) “tree”, but the right is “objects”:

class RealtyAdminModelForm(forms.ModelForm):
    location = TreeNodeChoiceField(queryset=Locations.objects.all(),
                                   level_indicator=u'+--')
class Meta:
    model = Realty

Leave a comment