physionet-build
physionet-build copied to clipboard
Project sections dynamically added from database
This is the second part of the changes required to add more flexibility on the project content.
Project section (e.g. Background, etc) are added from the fixtures written to the database, so the same as the project types PR, any adjustments on sections are added without having to change code.
- New model
ProjectSection
, composed of name, description and a FK to the project type for which that section is available. - New model
SectionContent
, which contains FKs to bothProjectSection
andCoreProject
, storing in thecontent
field, the content for each section of each project - Fixtures for the current sections of all
Database
,Software
,Challenge
andModel
entities were created - Fixtures for the demo projects were updated to reflect the changes
- Migration handles moving the content for all existing projects in this new approach
- Views, forms and html pages were updated to use the
ProjectSection
andSectionContent
to show and update the content of projects