You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this useful app with Django 1.6 and will try it with 1.8
Module admin.py needs 2 small fixes:
Change the definition of UserWithMPTTChangeForm by replacing Group.tree with Group.objects
class UserWithMPTTChangeForm(UserChangeForm):
groups = TreeNodeMultipleChoiceField(queryset=Group.objects.all())
Import models.py, even if no global object is being referred directly; otherways the admin autodiscover function could read the definition of class UserWithMPTTChangeForm before the Group model has been extended with contribute_to_class; in this case I got the following error message:
AttributeError: type object 'Group' has no attribute '_mptt_meta'
The text was updated successfully, but these errors were encountered:
I'm using this useful app with Django 1.6 and will try it with 1.8
Module admin.py needs 2 small fixes:
Change the definition of UserWithMPTTChangeForm by replacing Group.tree with Group.objects
class UserWithMPTTChangeForm(UserChangeForm):
groups = TreeNodeMultipleChoiceField(queryset=Group.objects.all())
Import models.py, even if no global object is being referred directly; otherways the admin autodiscover function could read the definition of class UserWithMPTTChangeForm before the Group model has been extended with contribute_to_class; in this case I got the following error message:
AttributeError: type object 'Group' has no attribute '_mptt_meta'
The text was updated successfully, but these errors were encountered: