You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
joshuadavidthomas
changed the title
Create initial configuration handling and initial options
Create initial configuration handling and options
Jan 3, 2025
I think to start we should just handle config files. Tagspecs should be included, and I'm not totally sure how to handle some configuration options in config files but not env vars (seems a bit silly to allow tagspec definitions in env vars?).
Anyway, initial configuration should be:
debug
settings module
venv path
tagspecs
For now, we can keep the CLI args separate, since there doesn't seem to be a way to combine Clap config args and the config crate's config parsing. I would use a different crate, but that seems to be the most popular and I'd rather go with it for the time being.
The core file-based configuration loading logic (user djls.toml, project pyproject.toml, .djls.toml, djls.toml) is implemented in the djls-conf crate. This handles the debug and venv_path settings mentioned or implied here.
For now, CLI argument integration and environment variable fallbacks are being deferred due to complexity with integrating clap and handling structured settings like tagspecs via env vars.
The remaining specific configuration options originally discussed (settings_module, tagspecs) are now tracked in dedicated issues #114 and #115 respectively. This issue can be considered mostly complete regarding the foundational file-loading system.
Need to get config working for basic settings like Django settings module and venv path. Should be flexible, highest priority to lowest:
pyproject.toml
ordjls.toml
)To start:
What other settings do we need besides these basics?
The text was updated successfully, but these errors were encountered: