Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that asset-related env vars and Django settings line up #32805

Closed
kdmccormick opened this issue Jul 20, 2023 · 1 comment
Closed

Ensure that asset-related env vars and Django settings line up #32805

kdmccormick opened this issue Jul 20, 2023 · 1 comment

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Jul 20, 2023

We have a few Django settings which must match up with certain environment variables in order for edx-platform to generate and find assets correctly. This is because the non-app things which generate assets look at env vars, whereas in the in-app things that use assets look at Django settings. The static asset build rewrite is pushing forward this reality.

Both the Tutor and Paver take care of this for operators, in different ways:

  • Tutor uses templates, so the operator specifies the setting once in their Tutor config, and Tutor renders it both into the environment and into Django settings.
  • Paver uses a management command (./manage.py [lms|cms] print_setting) to look up Django settings and inject them into environment variables. This suffers from the platform's slow startup time. Also, Paver-based asset builds are going away.

It'd be best if we didn't depend on either so that folks could stand up edx-platform on its own. Broadly speaking, I see two ways we can address this:

  • Documentation (Django settings docstrings, edx-platform README).
  • Load the Django settings based on environment variables.

Comment which brought up this ticket: #32804 (comment)

@kdmccormick
Copy link
Member Author

Done via #34467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant