eduNEXT / tutor-contrib-edunext-distro

A tool to facilitate the customization of an Openedx instance, adding commands and settings to have an easy-to-use and a ready-to-deploy in local or in development openedx distribution.
2 stars 1 forks source link

fix: missing middlewares #11

Closed Alec4r closed 2 years ago

Alec4r commented 2 years ago

Description

This PR adds the DISTRO_EXTRA_MIDDLEWARES variable to permit extending the MIDDLEWARE setting.

How to use

In config.yml:

DISTRO_EXTRA_MIDDLEWARES:
- middleware.test.1
- middleware.test.2

How to test

# 1. enabling distro plugin
pip install git+https://github.com/eduNEXT/tutor-contrib-edunext-distro.git@9-bug-missing-middlewares
tutor plugins enable distro

# 2. adding DISTRO_EXTRA_MIDDLEWARES to config.yml

# 3. saving the config changes
tutor config save

# 4. starting the lms shell
tutor local init
tutor local run lms bash
python manage.py lms shell --settings=tutor.production
from django.conf import settings
settings.MIDDLEWARE

You should see the middleware added in DISTRO_EXTRA_MIDDLEWARES

MaferMazu commented 2 years ago

Can you add some documentation to support that adding "EXTRA_MIDDLEWARES": [] in plugin.py config really adds middlewares or can you add how to test all the functionality?