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

Improve plugin related names #5145

Conversation

mkoistinen
Copy link
Contributor

This is the continuing saga of Django 1.9 vs. cmsplugin_ptr. The changes in this PR were initially contributed by @yakky's #5032.

@czpython
Copy link
Contributor

czpython commented Apr 7, 2016

why cms/tests/test_frontend.py → cms/tests/DISABLED_test_frontend.py ?

for field in new_class._meta.fields:
if field.name == 'cmsplugin_ptr':
app_label = new_class._meta.app_label
model_name = new_class._meta.concrete_model._meta.model_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh? are you not already skipping non-concrete classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. strangely, _meta.model_name still comes back with the ..._deferred_path bit... This fixed it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's very strange.. I advise to look into why it happens.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkoistinen could you clarify more this point? What do you mean with ..._deferred_path bit?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 88.489% when pulling d56aba6 on mkoistinen:feature/improve_plugin_related_names into 7077b7c on divio:develop.

@yakky
Copy link
Member

yakky commented Apr 9, 2016

Currently there is an issue with MTI: the plugins that inherit for a parent plugin overwrites the related_name, which must be kept to the parent one.
I'll send a PR with a test for this, and eventally a solution

@yakky
Copy link
Member

yakky commented Apr 9, 2016

@mkoistinen @czpython I opened a PR to your branch mkoistinen#2

@coveralls
Copy link

coveralls commented Apr 10, 2016

Coverage Status

Coverage increased (+0.001%) to 88.484% when pulling 027782f on mkoistinen:feature/improve_plugin_related_names into 7077b7c on divio:develop.

@mkoistinen
Copy link
Contributor Author

This is failing integration tests inside of the call to Django's get_deleted_objects():

https://gist.github.com/mkoistinen/028dd9690d19f6ac1f86a6f791fa4545

Any ideas how to make this work?

@czpython
Copy link
Contributor

@mkoistinen seems you reproduce this locally. what django version did you use?

@mkoistinen
Copy link
Contributor Author

Django 1.8 and Python 3.4

@czpython czpython force-pushed the feature/improve_plugin_related_names branch from 027782f to 6c17d1b Compare June 6, 2016 20:27
@czpython czpython closed this Jun 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants