Fixes #1304 Ability to add/edit deployment ids though the django admin panel #1318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft is working so far, but currently it's either/or. You define a config in the config file or in the admin panel.
This presents somewhat of a chicken/egg problem. Since you'd need to have the entry in the database or have a local admin account to login to add the initial configuration. I'm not sure the best way to handle this yet.
We could either
ToolConfDict
andDjangoDbToolConf
so you have to define something in the config file first which would allow an initial launch. But this initial launch wouldn't be editable."ENABLE_BACKEND_LOGIN": true
at least initially so it can be configured then maybe turn it off?I'm somewhat leaning against solution 1, because you can't modify the config JSON that's kind of a negative. Unless the software inserted that initial value into the database? Perhaps as a 4th idea similar to 1
If there is no data in the database but there is configuration data in the config file, populate the Db with the ToolConfDict data. (This would still require keys generated though so not super ideal)
Provide configurable SQL queries to populate the initial data in the database.