liquid_feedback_frontend
annotate 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 |
rev | line source |
---|---|
bsw/jbe@0 | 1 config.app_name = "LiquidFeedback" |
bsw@2 | 2 config.app_version = "alpha3" |
bsw/jbe@0 | 3 |
bsw/jbe@0 | 4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)" |
bsw/jbe@0 | 5 |
bsw/jbe@0 | 6 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" |
bsw/jbe@0 | 7 |
bsw@2 | 8 config.member_image_convert = { |
bsw@2 | 9 avatar = { "convert", "-", "-thumbnail", "48x48", "-" } |
bsw@2 | 10 } |
bsw@2 | 11 |
bsw/jbe@0 | 12 -- uncomment the following two lines to use C implementations of chosen |
bsw/jbe@0 | 13 -- functions and to disable garbage collection during the request, to |
bsw/jbe@0 | 14 -- increase speed: |
bsw/jbe@0 | 15 -- |
bsw/jbe@0 | 16 -- require 'webmcp_accelerator' |
bsw/jbe@0 | 17 -- collectgarbage("stop") |
bsw/jbe@0 | 18 |
bsw/jbe@0 | 19 -- open and set default database handle |
bsw/jbe@0 | 20 db = assert(mondelefant.connect{ |
bsw/jbe@0 | 21 engine='postgresql', |
bsw/jbe@0 | 22 dbname='liquid_feedback' |
bsw/jbe@0 | 23 }) |
bsw/jbe@0 | 24 at_exit(function() |
bsw/jbe@0 | 25 db:close() |
bsw/jbe@0 | 26 end) |
bsw/jbe@0 | 27 function mondelefant.class_prototype:get_db_conn() return db end |
bsw/jbe@0 | 28 |
bsw/jbe@0 | 29 -- enable output of SQL commands in trace system |
bsw/jbe@0 | 30 function db:sql_tracer(command) |
bsw/jbe@0 | 31 return function(error_info) |
bsw/jbe@0 | 32 local error_info = error_info or {} |
bsw/jbe@0 | 33 trace.sql{ command = command, error_position = error_info.position } |
bsw/jbe@0 | 34 end |
bsw/jbe@0 | 35 end |
bsw/jbe@0 | 36 |
bsw/jbe@0 | 37 -- 'request.get_relative_baseurl()' should be replaced by the absolute |
bsw/jbe@0 | 38 -- base URL of the application, as otherwise HTTP redirects will not be |
bsw/jbe@0 | 39 -- standard compliant |
bsw/jbe@0 | 40 request.set_absolute_baseurl(request.get_relative_baseurl()) |
bsw/jbe@0 | 41 |
bsw/jbe@0 | 42 |
bsw/jbe@0 | 43 |
bsw@2 | 44 -- TODO abstraction |
bsw/jbe@0 | 45 -- get record by id |
bsw/jbe@0 | 46 function mondelefant.class_prototype:by_id(id) |
bsw/jbe@0 | 47 local selector = self:new_selector() |
bsw/jbe@0 | 48 selector:add_where{ 'id = ?', id } |
bsw/jbe@0 | 49 selector:optional_object_mode() |
bsw/jbe@0 | 50 return selector:exec() |
bsw/jbe@0 | 51 end |
bsw/jbe@0 | 52 |
bsw@2 | 53 |