mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

create a settings table for site-specific configuration in the database #943

Closed mhl closed 8 years ago

mhl commented 8 years ago

In order to make it easier to configure a new YourNextRepresentative instance without having to edit files, we'd like to move some of the settings in conf/general.yml into a new settings table.

For example, we would want this to include these settings:

... and possibly others.

Some questions to address here:

struan commented 8 years ago

Having had a bit of a look at existing apps this looks to be the best of them:

https://django-usersettings2.readthedocs.io/en/latest/readme.html

in that it uses the sites framework and has some handy caching and middleware features. It also is the only one I found that supported Python 3. We would need to build an interface on top of it (it does have an admin interface built in)

wfdd commented 8 years ago

I'm trying this out right now. A couple of observations/suggestions:

wfdd commented 8 years ago

I don't think 'Maximum party list size to display on post page' is the right label for CANDIDATES_REQUIRED_FOR_WEIGHTED_PARTY_LIST - you might've confused it with the 'default party list members to show' election setting.