-
Notifications
You must be signed in to change notification settings - Fork 2
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
add new feature #12
Comments
I do like the idea of providing default values to aid with adding new settings. That is definitely a shortcoming of the library at the moment. Django constance allows users to specify these default settings in the django settings file. I am not sure of the best approach for this at the moment - whether to expect a setty_settings.py file in an app or look for a specific setting name in the project settings file. |
But what if some applications need to be disabled? And this approach allows you to store the settings in the application.
app_settings or default_settings, may be setty_default_settings ... need to discuss
its not good idea, but And its default settings only to command P.S. Sorry for the long silence, I became dady =D And I'll be back soon. P.S.S. Setty is very actually for my work. |
may be setting filename and setting name specify in django settings |
Hi - congratulations :) I think having a setty_settings.py file in an app is acceptable for default settings. I also think that we should autodiscover all of these files on load to ensure that the defaults are picked up. If it is left up to a management command the database could get out of sync with the contents of the file. I'll try and take a look at this soon! |
Hello!
I wrote
manage.py
command handler to setty based ondefault_settings.py
file on application dir.If the file exist, handler import that file and invite to input variable value and save into DB.
If this functionality is needed, I can prepare pull request.
Full code:
It would be nice to remake choices in TypeChoices into standard python types names ('string' -> 'str' and 'integer' -> 'int').
And i have working templatetag & template to map Setty variable into JS variable.
Templatetag code:
Template code:
P.S. In plans to add a property that will determine where this setting is needed (JS/Django).
The text was updated successfully, but these errors were encountered: