Allow plugins to update contexts in specific views
Instead of requiring views like the dashboard to know about plugins so they can include their data in the context, this allows plugins to define a mapping between a view and a function where the function returns a dictionary of new context for the view. Each view would have to purposefully enable this additional context before it could be used. This will allow new content to be added to the pages without updating the core with a combination of a plugin to add new context, and a theme override of that page to use the new context.
Showing
- common/djangoapps/student/views/dashboard.py 9 additions, 0 deletionscommon/djangoapps/student/views/dashboard.py
- openedx/core/djangoapps/plugins/README.rst 19 additions, 1 deletionopenedx/core/djangoapps/plugins/README.rst
- openedx/core/djangoapps/plugins/constants.py 16 additions, 0 deletionsopenedx/core/djangoapps/plugins/constants.py
- openedx/core/djangoapps/plugins/plugin_contexts.py 35 additions, 0 deletionsopenedx/core/djangoapps/plugins/plugin_contexts.py
Please register or sign in to comment