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

Simple content blocks #1060

Merged
merged 5 commits into from Jun 19, 2019
Merged

Simple content blocks #1060

merged 5 commits into from Jun 19, 2019

Conversation

rstorey
Copy link
Member

@rstorey rstorey commented Jun 13, 2019

This addresses the last item in #901

Content blocks must be predefined in the code with a label. That label is then used to populate the content block in the database through the Django admin. A feature flag is used to globally enable or disable the usage of these content blocks.

It's expected that this feature will be used for the Quick Tips section in the classic UI and the Help side panel in the activity UI.

This PR is built on the admin-enhancements branch.

@rstorey rstorey self-assigned this Jun 13, 2019
@rstorey rstorey added this to In progress in Sprint 24 June 10 - July 22 via automation Jun 14, 2019
@rstorey rstorey requested a review from acdha June 19, 2019 18:47
Copy link
Member

@acdha acdha left a comment

Choose a reason for hiding this comment

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

I'd probably write this using SimpleContentBlock.DoesNotExist since that avoids the extra import and has a benefit in more complicated code of not catching exceptions from an unexpected object but for something like this it's really not worth spending more time on.

@rstorey
Copy link
Member Author

rstorey commented Jun 19, 2019

I'd probably write this using SimpleContentBlock.DoesNotExist since that avoids the extra import and has a benefit in more complicated code of not catching exceptions from an unexpected object but for something like this it's really not worth spending more time on.

That answers a question I had in my head after reading the Django docs. Thanks.

@rstorey rstorey merged commit 70f02d3 into admin-enhancements Jun 19, 2019
Sprint 24 June 10 - July 22 automation moved this from In progress to Done Jun 19, 2019
@acdha acdha deleted the simple-content-blocks branch June 20, 2019 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants