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

fix field clashes with 'file' in Django 1.9 #301

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

stefanfoulis
Copy link
Contributor

Set cmsplugin_ptr and remove related_name to avoid field name clashes
with any other plugin that has a field called "file".

see django-cms/django-cms#5030

Set cmsplugin_ptr and remove related_name to avoid field name clashes
with any other plugin that has a field called "file".

see django-cms/django-cms#5030
@@ -23,6 +23,13 @@ def hyphenate(t):
@python_2_unicode_compatible
class AbstractText(CMSPlugin):
"""Abstract Text Plugin Class"""

# Set cmsplugin_ptr and remove related_name to avoid field name clashes
# with any other plugin that has a field called "file".
Copy link
Contributor

Choose a reason for hiding this comment

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

a field called "abstracttext"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, a field called whatever the lowercase name of the concrete subclass is called. In this case text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and even if it were abstracttext... still a field name you might want to use ;-)

@czpython
Copy link
Contributor

👍

stefanfoulis added a commit that referenced this pull request Feb 26, 2016
fix field clashes with 'file' in Django 1.9
@stefanfoulis stefanfoulis merged commit a61297a into master Feb 26, 2016
@stefanfoulis stefanfoulis deleted the fix/field-name-clash branch February 26, 2016 20:41
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

2 participants