Ticket #277 (assigned enhancement)

Opened 4 years ago

Last modified 3 years ago

Set some config options / settings in WUI (extension)

Reported by: dread Owned by: zephod
Priority: awaiting triage Milestone: ckan-backlog
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description (last modified by rgrp) (diff)

Use case

As a ckan administrator I want to easily change options about the CKAN install.

Implementation

Settings to be in DB

Suggested:

## Title of site (using in several places including templates and <title> tag
ckan.site_title = CKAN

## Logo image to use (replaces site_title string on front page if defined)
ckan.site_logo = http://assets.okfn.org/p/ckan/img/ckan_logo_box.png

## Site tagline / description (used on front page)
ckan.site_description = 

## Used in creating some absolute urls (such as rss feeds, css files) and 
## dump filenames
ckan.site_url =

## Favicon (default is the CKAN software favicon)
ckan.favicon = http://assets.okfn.org/p/ckan/img/ckan.ico


## An 'id' for the site (using, for example, when creating entries in a common search index) 
## If not specified derived from the site_url
# ckan.site_id = ckan.net

## API url to use (e.g. in AJAX callbacks)
## Enable if the API is at a different domain
# ckan.api_url = http://www.ckan.net

## html content to be inserted just before </body> tag (e.g. google analytics code)
## NB: can use html e.g. <strong>blah</strong>
## NB: can have multiline strings just indent following lines
# ckan.template_footer_end = 

NB: these will still need to be stored somewhere for loading on initialization. do this in db init function ...

Settings / Options / KeyValues? Table

Columns:

  • [namespace]: ? only if KeyValues? (for settings this would then always be settings)
  • key
  • label
  • value (json)
  • type (e.g. date and to specify in advance what type should be)
  • description
  • tags: ?? (for grouping ...)

Loading settings from DB

Do this in ckan/config/environment.py

WUI

  • /ckan-admin/settings
  • Show label, plus description plus text field

Depends

  • Would be part of ckan-admin section and hence build on ticket:833 (Administrative dashboard)

Change History

comment:1 Changed 4 years ago by rgrp

  • Priority changed from awaiting triage to major
  • Description modified (diff)
  • Milestone set to v1.1

comment:2 Changed 4 years ago by dread

  • Milestone changed from v1.1 to longterm

comment:3 Changed 3 years ago by thejimmyg

My opinion is that having configuration in a database is a bad idea.

We are currently considering moving to a system where CKAN is installable using apt-get. Since we're already moving functionality into CKAN extensions, choosing what you want kind of CKAN you would like would then be as simple as chosing the package to install. Configuring it would just be editing the config file.

I don't think this is as relevant as it was 10 months ago. Anyone mind if I change this to wontfix?

comment:4 Changed 3 years ago by rgrp

  • Priority changed from major to awaiting triage
  • Summary changed from Settings WUI to Settings in WUI (extension)
  • Description modified (diff)
  • Milestone longterm deleted

I think this is useful but there may be complexities giving the non-reloading nature of python apps. Have also converted to an extension

comment:5 Changed 3 years ago by rgrp

  • Summary changed from Settings in WUI (extension) to Set config options / settings in WUI (extension)

comment:6 Changed 3 years ago by kindly

I think generally this is a bad idea. I think in a few controlled circumstances some configuration is worth changing at runtime, however looking through the development.ini file I do not see hardly anything in there that does not require a restart anyway. It would be good to have some clear examples of things that would be in the extension.

comment:7 Changed 3 years ago by rgrp

  • Repository set to ckan
  • Theme set to none
  • Summary changed from Set config options / settings in WUI (extension) to Set some config options / settings in WUI (extension)

comment:8 Changed 3 years ago by rgrp

  • Owner changed from rgrp to zephod
  • Status changed from new to assigned
  • Description modified (diff)
  • Milestone set to ckan-sprint-2011-10-10

comment:9 Changed 3 years ago by zephod

  • Milestone changed from ckan-sprint-2011-10-10 to ckan-current-sprint

comment:10 Changed 3 years ago by zephod

  • Milestone changed from ckan-current-sprint to ckan-backlog
Note: See TracTickets for help on using tickets.