[GH-ISSUE #245] Have all configs in one place or read from admin-made drop-in config files #197

Closed
opened 2026-02-25 21:31:25 +03:00 by kerem · 1 comment
Owner

Originally created by @amo13 on GitHub (Dec 5, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/245

Originally assigned to: @ciur on GitHub.

Is your feature request related to a problem? Please describe.
I set up redis as a message broker and the configuration for this is in base.py. Upon updates, this files gets overwritten by the updated file, which is good from the update point on view, but inconvenient from the config point of view.

Describe the solution you'd like
Move the configuration part for redis (and maybe other potentially relevant configurations) from base.py to papermerge.conf.py, which does not get overwritten. Another idea would be to have a folder from which drop-in configuration files are read, maybe with lower precedence than the main config file papermerge.conf.py.

Originally created by @amo13 on GitHub (Dec 5, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/245 Originally assigned to: @ciur on GitHub. **Is your feature request related to a problem? Please describe.** I set up redis as a message broker and the configuration for this is in base.py. Upon updates, this files gets overwritten by the updated file, which is good from the update point on view, but inconvenient from the config point of view. **Describe the solution you'd like** Move the configuration part for redis (and maybe other potentially relevant configurations) from base.py to papermerge.conf.py, which does not get overwritten. Another idea would be to have a folder from which drop-in configuration files are read, maybe with lower precedence than the main config file papermerge.conf.py.
Author
Owner

@ciur commented on GitHub (Mar 8, 2021):

@amo13, in base.py only general purpose configuration goes. Think of base.py as a place which gathers all config from other, more specific places.
Those "specific" places are two:

  • django settings file, which is usually named either production.py, or dev.py or test.py depending on the context. That django configuration is the file you are looking for.
  • papermerge.conf.py which is more user friendly config.

Configuration are assembled in base.py file which imports all configurations from production.py (or dev.py or whatever DJANGO_SETTINGS_MODULE points to) AND from papermerge.conf.py.

Here is more info on the topic.

I am pretty happy how configuration works now. It is practical and generally speaking no objection about its structure.

<!-- gh-comment-id:792949336 --> @ciur commented on GitHub (Mar 8, 2021): @amo13, in base.py only general purpose configuration goes. Think of base.py as a place which gathers all config from other, more specific places. Those "specific" places are two: - django settings file, which is usually named either production.py, or dev.py or test.py depending on the context. That django configuration is the file you are looking for. - papermerge.conf.py which is more user friendly config. Configuration are assembled in base.py file which imports all configurations from production.py (or dev.py or whatever DJANGO_SETTINGS_MODULE points to) AND from papermerge.conf.py. Here is [more info](https://www.papermerge.com/docs/Installation/settings.html#papermerge-prefix) on the topic. I am pretty happy how configuration works now. It is practical and generally speaking no objection about its structure.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#197
No description provided.