Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRO problem using django-modeltranslation #38

Closed
bsvetchine opened this issue Dec 4, 2015 · 9 comments
Closed

MRO problem using django-modeltranslation #38

bsvetchine opened this issue Dec 4, 2015 · 9 comments
Assignees
Labels

Comments

@bsvetchine
Copy link
Contributor

In dbmail/admin.py line 55, the definition of class TranslationModelAdmin causes a method resolution order error.

I am using python 2.7.3, django 1.8.7 and modeltranslation 0.10.2.

TypeError: Error when calling the metaclass bases
    Cannot create a consistent method resolution
order (MRO) for bases ModelAdmin, TabbedDjangoJqueryTranslationAdmin
@gotlium
Copy link
Collaborator

gotlium commented Dec 4, 2015

@bsvetchine, thanks for report.

@vosi, can you check. because previously you are wrote this code #21

@gotlium
Copy link
Collaborator

gotlium commented Dec 4, 2015

You could not remove ModelAdmin, because django-reversion and django-reversion-compare is a ModelAdmin, if this apps was installed, and when you are using model translation, this apps is should be mix to one. At previous release this Admin mixins not found at admin.py file https://github.com/LPgenerator/django-db-mailer/blob/2ef5d6d5437601bd633d0ef43ed9c5defb67da7b/dbmail/admin.py. I think that we have to find another way to fix this.

@bsvetchine
Copy link
Contributor Author

@gotlium I updated the Pull request #39 changing TranslationModelAdmin inheritance order. It fixes the MRO problem.

Indeed I use django-reversion and django-reversion-compare in my project and django-db-mailer works without any problem in version 2.2.0.

@gotlium
Copy link
Collaborator

gotlium commented Dec 4, 2015

@bsvetchine Current version is 2.3. I think your fixes is for current version, not for 2.2.0. You should test 2.3 on your project with your MRO fixes.

@gotlium gotlium assigned skhaylov and gotlium and unassigned skhaylov and gotlium Dec 4, 2015
@gotlium gotlium added the bug label Dec 4, 2015
@bsvetchine
Copy link
Contributor Author

Yes indeed my fix is for version 2.3 only. I try to update dbmailer from version 2.2.0 to 2.3 in my project. That's when I face this MRO pb.

@bsvetchine
Copy link
Contributor Author

And I have no pb using my fix with dbmail in version 2.3 in my project

@gotlium
Copy link
Collaborator

gotlium commented Dec 4, 2015

So now django-reversion, django-reversion-compare, django-modeltranslation, grappelli-modeltranslation working properly without any problems on your project?

@bsvetchine
Copy link
Contributor Author

I do not use grappelli-modeltranslation.

But using django-reversion, django-reversion-compare, django-modeltranslation and dbmailer version 2.3 with my fix, it works without any problems.

@gotlium
Copy link
Collaborator

gotlium commented Dec 4, 2015

I think @skhaylov , @vosi will be check, and after we merge your pull-request and release new version to PyPi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants