Skip to content

Commit

Permalink
fix: templates loading reset
Browse files Browse the repository at this point in the history
This fix the order ready method of eox_nelp works. Mainly this avoid
that if eox_nelp is intalled before eox_theming. eox_theming should not reset look_ups in it ready method.
https://github.com/eduNEXT/eox-theming/blob/v8.1.0/eox_theming/apps.py#L58

So with this change eox_nelp exteding template in the ready method would work.
https://github.com/eduNEXT/eox-nelp/blob/8c8306e59e94bc0209c49d044dc5d5c12874be98/eox_nelp/init_pipeline.py#L60
  • Loading branch information
johanseto committed Dec 10, 2024
1 parent e214a56 commit 2ec45dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eox_nelp/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

JSON_API_REST_FRAMEWORK = 'rest_framework_json_api'
EOX_AUDIT_MODEL_APP = 'eox_audit_model.apps.EoxAuditModelConfig'
EOX_NELP_MODEL_APP = 'eox_nelp.apps.EoxNelpConfig'


def plugin_settings(settings):
Expand Down Expand Up @@ -67,7 +68,6 @@ def plugin_settings(settings):
settings.INSTALLED_APPS.append(JSON_API_REST_FRAMEWORK)
if find_spec('eox_audit_model') and EOX_AUDIT_MODEL_APP not in settings.INSTALLED_APPS:
settings.INSTALLED_APPS.append(EOX_AUDIT_MODEL_APP)

try:
payments_notifications_context = (
'eox_nelp.payment_notifications.context_processor.payments_notifications_context'
Expand All @@ -82,3 +82,7 @@ def plugin_settings(settings):
except AttributeError:
# We must find a way to register this error
pass
# Ensure EOX_NELP is the last plugin installed app for ready run.
if EOX_NELP_MODEL_APP in settings.INSTALLED_APPS and settings.INSTALLED_APPS[-1] != EOX_NELP_MODEL_APP:
settings.INSTALLED_APPS.remove(EOX_NELP_MODEL_APP)
settings.INSTALLED_APPS.append(EOX_NELP_MODEL_APP)

0 comments on commit 2ec45dd

Please sign in to comment.