Merge lp:~tim-clicks/sahana-eden/rels into lp:sahana-eden

Proposed by Tim McNamara
Status: Needs review
Proposed branch: lp:~tim-clicks/sahana-eden/rels
Merge into: lp:sahana-eden
Diff against target: 56 lines (+20/-10)
2 files modified
models/000_config.py (+19/-1)
models/02_pr.py (+1/-9)
To merge this branch: bzr merge lp:~tim-clicks/sahana-eden/rels
Reviewer Review Type Date Requested Status
Fran Boon Pending
Review via email: mp+35062@code.launchpad.net

Description of the change

To post a comment you must log in.

Unmerged revisions

1219. By Tim McNamara

Religion list as deployment setting. Fixes #594

Changes:
  - created "Unknown" religion category
  - moved current list of religions to 000_settings.py
  - pr_religion_opts is now a reference to
    deployment_settings.religions

This patch moves the list of religions in the people registry
into a list in settings model. This makes things more
flexible for deployers.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'models/000_config.py'
2--- models/000_config.py 2010-09-09 07:45:10 +0000
3+++ models/000_config.py 2010-09-10 08:59:40 +0000
4@@ -69,6 +69,24 @@
5 # Address to which mails get sent to approve new users
6 deployment_settings.mail.approver = "useradmin@your.org"
7
8+# Available languages for selection
9+# Feel free to change the available options here to suit
10+# the needs of the deployment.
11+
12+deployment_settings.religion = {
13+ # WARNING
14+ # do not change the keys that have
15+ # already been set
16+ 0:T("Unknown"),
17+ 1:T("None"),
18+ 2:T("Christian"),
19+ 3:T("Muslim"),
20+ 4:T("Jew"),
21+ 5:T("Buddhist"),
22+ 6:T("Hindu"),
23+ 99:T("Other")
24+}
25+
26 # L10n settings
27 # Uncomment this if the deployment is just in a few countries
28 # (used in the GIS Location Selector & maybe in future: Messaging)
29@@ -319,4 +337,4 @@
30 # description = Tstr("An intake system, a warehouse management system, commodity tracking, supply chain management, procurement and other asset and resource management capabilities."),
31 # module_type = 10
32 # ),
33-)
34\ No newline at end of file
35+)
36
37=== modified file 'models/02_pr.py'
38--- models/02_pr.py 2010-09-06 08:48:05 +0000
39+++ models/02_pr.py 2010-09-10 08:59:40 +0000
40@@ -239,15 +239,7 @@
41
42
43 # -----------------------------------------------------------------------------
44-pr_religion_opts = {
45- 1:T("none"),
46- 2:T("Christian"),
47- 3:T("Muslim"),
48- 4:T("Jew"),
49- 5:T("Buddhist"),
50- 6:T("Hindu"),
51- 99:T("other")
52-}
53+pr_religion_opts = deployment_settings.religion
54
55 pr_religion = db.Table(None, "religion",
56 Field("religion", "integer",