-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Feature: Why config of "template_dir" is just a single directory #746
Comments
@TomFreudenberg this I believe was an evolution in design. I think originally we only had
The list of |
Hi @derks I can agree but the question is if this must be the same in future. For me, it would be great if
allows to be set by external config with "single string" or (new) "list of strings"
are available in external config as well Currently neither will work. What solution (1 or 2) would meet your needs the best? |
@TomFreudenberg I agree, I think it would make sense to add to config. This is supported though with minor modifications.
IMPORTANT NOTE: I believe that this will only work if using the YamlConfigHandler or JsonConfigHandler, as they support more complex data types. The following example is using the YamlConfigHandler (default with ~/.myapp.yml:
main.py:
You can see it is honored:
Output:
|
@TomFreudenberg to further expand on your "ideal" request: Setting a simple string with result in the string being expanded (as-is today). It would be a minor change to automatically convert a string to a list, but would need be implemented. We do not have the same thing for "config_dir" vs "config_dirs", so I agree it is confusing to support both. I am in favor of deprecating "template_dir", and supporting auto conversion of a string -> list if only one is given to "template_dirs". |
@derks thanks for positive feedback. Let me know if I can support you in that issue. |
Thanks @TomFreudenberg -> Does this resolve what you are seeing in Issue #745? |
Hey @derks
in config there is the option:
but why not allowed multiple dirs or
If you like, I can creata a PR, currently I created my own extensions but for this I miss the reason why not by framework.
Cheers
Tom
The text was updated successfully, but these errors were encountered: