liquid_feedback_frontend
view config/default.lua @ 2:5c601807d397
Version alpha3
Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft
Wiki formatting for drafts
Showing differences between two drafts of the same initiative
Display of outgoing delegation chains
Many other improvements
Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft
Wiki formatting for drafts
Showing differences between two drafts of the same initiative
Display of outgoing delegation chains
Many other improvements
author | bsw |
---|---|
date | Mon Nov 23 12:00:00 2009 +0100 (2009-11-23) |
parents | dd0109e81922 |
children | 768faea1096d |
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "alpha3"
4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
6 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
8 config.member_image_convert = {
9 avatar = { "convert", "-", "-thumbnail", "48x48", "-" }
10 }
12 -- uncomment the following two lines to use C implementations of chosen
13 -- functions and to disable garbage collection during the request, to
14 -- increase speed:
15 --
16 -- require 'webmcp_accelerator'
17 -- collectgarbage("stop")
19 -- open and set default database handle
20 db = assert(mondelefant.connect{
21 engine='postgresql',
22 dbname='liquid_feedback'
23 })
24 at_exit(function()
25 db:close()
26 end)
27 function mondelefant.class_prototype:get_db_conn() return db end
29 -- enable output of SQL commands in trace system
30 function db:sql_tracer(command)
31 return function(error_info)
32 local error_info = error_info or {}
33 trace.sql{ command = command, error_position = error_info.position }
34 end
35 end
37 -- 'request.get_relative_baseurl()' should be replaced by the absolute
38 -- base URL of the application, as otherwise HTTP redirects will not be
39 -- standard compliant
40 request.set_absolute_baseurl(request.get_relative_baseurl())
44 -- TODO abstraction
45 -- get record by id
46 function mondelefant.class_prototype:by_id(id)
47 local selector = self:new_selector()
48 selector:add_where{ 'id = ?', id }
49 selector:optional_object_mode()
50 return selector:exec()
51 end