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

Refactor configuration options #869

Open
mauromsl opened this issue Feb 11, 2019 · 2 comments
Open

Refactor configuration options #869

mauromsl opened this issue Feb 11, 2019 · 2 comments
Labels
enhancement Add or improve something on an existing feature t-shirt epic A very large piece of work that will need to be broken up into smaller issues

Comments

@mauromsl
Copy link
Member

mauromsl commented Feb 11, 2019

Janeway currently supports 3 main mechanism for setting up configurable items.

  • Django `settings handler: This is a python module that can declare all caps variables and will be lazily loaded once when the request handler is first fired up. Some 3rd party libraries are making use of specific names declared here. (this has recently been skimmed down by Improve settings handling #582 )

  • model attributes across "site" models (i.e. press.models.Press, journal.models.Journal). These configurable options are persisted in the DB and loaded up per request. They can be modified by the users. moved to Expand settings modelling to be compatible with arbitrary site types #3528

  • The core.Setting* models: These configuration types allow registering typed settings (text, char, number), can be combined into logical groups, are translatable (even non-text settings) and their value is unique per journal.

As it currently stands there is a lack of consistency in terms of which mechanism is suitable for a given config item. We should review them and consider which mechanism is the most appropriate for each setting as well as enforce some rules moving forward.

@mauromsl mauromsl added the enhancement Add or improve something on an existing feature label Feb 11, 2019
@ajrbyers ajrbyers added the ajrb-f label Feb 6, 2023
@joemull joemull added the jy label Feb 7, 2023
@ajrbyers ajrbyers added the t-shirt epic A very large piece of work that will need to be broken up into smaller issues label Feb 27, 2023
@ajrbyers
Copy link
Member

ajrbyers commented May 5, 2023

Discussions about this have been ongoing and it is now generally agreed that wherever possible we will migration attributes from the Press/Journal/Repository models to Setting objects. This will require a revamp of the Setting model and setting_handler to ensure it works for the Press and Repository objects.

@mauromsl
Copy link
Member Author

mauromsl commented May 5, 2023

Discussions about this have been ongoing and it is now generally agreed that wherever possible we will migration attributes from the Press/Journal/Repository models to Setting objects. This will require a revamp of the Setting model and setting_handler to ensure it works for the Press and Repository objects.

Moved this to its own issue

@ajrbyers ajrbyers removed the ajrb-f label Aug 14, 2023
@ajrbyers ajrbyers removed the jy label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Add or improve something on an existing feature t-shirt epic A very large piece of work that will need to be broken up into smaller issues
Projects
None yet
Development

No branches or pull requests

3 participants