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

Add __str__ method to Banner model #5752

Merged
merged 2 commits into from
May 29, 2020
Merged

Add __str__ method to Banner model #5752

merged 2 commits into from
May 29, 2020

Conversation

Scotchester
Copy link
Contributor

@Scotchester Scotchester commented May 29, 2020

This will display the title of the banner in various places in the Wagtail admin, instead of generic text like "Banner object (2)".

Additions

  • __str__ method added to Banner model

Testing

With a recent database dump:

  1. Visit http://localhost:8000/admin/v1/banner/edit/2/ and see that the header reads: "EDITING Banner object (2)"
  2. Pull branch
  3. Refresh the page and see that the header now reads: "EDITING Interagency mortgage and housing assistance pages"

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the CFPB development guidelines
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated
  • Reviewers requested with the Reviewers tool ➡️

This will display the title of the banner in various places in the Wagtail admin, instead of generic text like "Banner object (2)".
@Scotchester Scotchester requested a review from a team May 29, 2020 13:44
@Scotchester Scotchester merged commit 3d5201c into master May 29, 2020
@Scotchester Scotchester deleted the add-base-str branch May 29, 2020 16:38
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.

2 participants