-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer allow '+' as related_name in PlaceholderField
Setting the related_name in a models.fields.PlaceholderField to '+' causes the permission checks on models.Placeholder to fail because models.Placeholder._get_attached_fields which is used by the permission system will not find the attached model. This patch prevents this by simply raising a ValueError if a developer attempts to create a models.fields.PlaceholderField with '+' as related_name. This is documented in extending_cms/placeholders.rst and tested in PlaceholderTestCase.test_placeholder_field_no_related_name.
- Loading branch information
Showing
3 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters