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

No longer allow '+' as related_name in PlaceholderField #1448

Merged
merged 2 commits into from
Sep 27, 2012

Commits on Sep 26, 2012

  1. 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.
    ojii committed Sep 26, 2012
    Configuration menu
    Copy the full SHA
    81d7271 View commit details
    Browse the repository at this point in the history
  2. Improved docs for the related_name change in PlaceholderField

    Fixed typos and reduced line length to <80
    ojii committed Sep 26, 2012
    Configuration menu
    Copy the full SHA
    94db285 View commit details
    Browse the repository at this point in the history