| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Base it directly off of common and try to keep it as small as possible. Regarding plugin loading: Ideally the name of this setting would be "DEVELOPMENT" and not tied to the devstack but since that's an interface change, we use the devstack settings which should be what is setup for development. Regarding the webpack loader settings: WEBPACK_LOADER's STATS_FILE is derived from STATIC_ROOT in openedx/envs/common.py. In the new development.py settings the base STATIC_ROOT default is ENV_ROOT/staticfiles (LMS) and ENV_ROOT/staticfiles/studio (CMS), which point *outside* the repo. That is not where the webpack build writes its stats manifest: with STATIC_ROOT_LMS / STATIC_ROOT_CMS unset, webpack.common.config.js falls back to ./test_root/staticfiles (and .../studio for CMS). As a result render_bundle raised "Error reading .../staticfiles/webpack-stats.json" on every page that renders a webpack bundle. Point STATIC_ROOT at the in-repo test_root location so the derived STATS_FILE lands where webpack actually writes it. This makes the Python default agree with webpack's JS default with no STATIC_ROOT_LMS / STATIC_ROOT_CMS wiring, and mirrors what the test settings already do (openedx/envs/test.py). This is only about locating the stats manifest -- collectstatic is not part of the development flow. With DEBUG=True the staticfiles finders serve assets directly from their source dirs (e.g. the bundles in common/static/bundles), so nothing writes into STATIC_ROOT during normal development.
Document the new bare-metal development workflow that runs the LMS and CMS with the dedicated `development.py` settings module (building directly on `common.py`) and the `local.openedx.io` domains, rather than the legacy `devstack.py` settings on `localhost`. The how-to covers the `--settings=development` runserver commands (local.openedx.io:8000 for LMS, studio.local.openedx.io:8001 for CMS), migrations, the webpack asset build (and why collectstatic is not needed), CMS SSO setup, running the MFEs against the LMS MFE Config API, and the notable differences from devstack (eager Celery, MFE config served by the LMS, pre-declared CORS/CSRF/login-redirect origins). It is linked from the README as an experimental item under "For Development"; it is intentionally not yet the recommended default while the base README and workflow are still being updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The two settings were previously hard-coded in the lms and openedx common.py making it hard to make reasonable defaults using the ENV_ROOT setting.
Enable meilisearch by default and document what is needed on the server side to make it work cleanly.
There was a problem hiding this comment.
great work!
haven't tested yet, but here are my comments so far.
looking forward to merging this very soon.
Sorry, something went wrong.
| # that MFE turns out to need to call Studio APIs directly. | ||
| CORS_ORIGIN_WHITELIST = ( | ||
| "http://apps.local.openedx.io:2001", # authoring (Studio) | ||
| # "http://apps.local.openedx.io:1984", # communications |
There was a problem hiding this comment.
optional nit: consider just deleting all the commented-out lines to avoid drift. it's easy enough to copy these in from the LMS side if ever necessary.
Sorry, something went wrong.
| # Each development MFE is served under apps.local.openedx.io on its own port. Every MFE fetches its | ||
| # config from the LMS MFE Config API, so each origin must be allowed here for that cross-origin | ||
| # request to succeed. | ||
| CORS_ORIGIN_WHITELIST = ( |
There was a problem hiding this comment.
| CORS_ORIGIN_WHITELIST = ( | |
| CORS_ORIGIN_WHITELIST = ( | |
| # frontend-base shell (all new-style apps): | |
| "http://apps.local.openedx.io:8080", | |
| # old-style "MFE" apps: |
I suggest adding frontend-base here, as well as to LOGIN_REDIRECT_WHITELIST, CSRF_TRUSTED_ORIGINS, and the CMS versions of those lists.
Sorry, something went wrong.
| # the MFE origin must be trusted here or Studio rejects writes with a 403 ("Origin checking | ||
| # failed"). Scoped to the authoring MFE for the same reason as CORS_ORIGIN_WHITELIST above; | ||
| # uncomment another origin if that MFE needs to make write requests to Studio. | ||
| CSRF_TRUSTED_ORIGINS = [ |
There was a problem hiding this comment.
curious, do you know why CSRF_TRUSTED_ORIGINS is needed for CMS but not LMS?
Sorry, something went wrong.
There was a problem hiding this comment.
just going to approve and merge, since it's easier to generate feedback by just testing this out with features I'm working on. will follow up with a PR with my suggested improvements later on :)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Adds experimental development.py settings for the LMS and CMS that build directly on common.py, as a first step toward replacing the devstack.py / production.py-based local development flow with something cleaner and better documented. Uses local.openedx.io subdomains instead of localhost so cookie / CORS / CSRF behavior resembles a real deployment.
Experimental — not the default. devstack.py and production.py are unchanged, so existing developers and operators are unaffected. Setup steps: docs/how-tos/using_development_settings.rst.
Related PRs (need to merge)
Companion PRs pointing each default MFE's dev script at local.openedx.io so they work with these settings: