jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 294 forks source link

Fix MRO error introduced in #301 #308

Closed asnoeyink closed 6 years ago

asnoeyink commented 7 years ago

If this test is run without applying the fix to angular_base, it will cause a Cannot create a consistent method resolution order (MRO) error. This is because the NgWidgetMixin is added to the DummyForm()'s widgets more than once. In order to fix this, I added a check to make sure NgWidgetMixin is not already in the widget's bases before adding it.

asnoeyink commented 7 years ago

For some reason, we were getting the MRO error on any page that contained a Django form. I'm not exactly sure why it was happening in these cases. Potentially we configured something wrong somewhere along the line. However, there is one case where we are intentionally rendering a form twice (two search boxes that are searching the same queryset), and that is what the test came out of.

jrief commented 6 years ago

Ups, oversaw the pending merge request. Thanks for reminding.