51 | | {{{ |
52 | | #!python |
53 | | modules = { |
54 | | "default":True, |
55 | | "admin":True, |
56 | | "gis":True, |
57 | | } |
58 | | #true meaning "on" |
59 | | }}} |
60 | | |
61 | | Here the “on” indicate that the default value of the module status is on. |
62 | | |
63 | | In the modules the layout is not required, as they are stored when we run the modified form of 000_config in the models. The input types of these (name, Description, Access level) are quite fixed so they need not to be stored separately. Therefore not much help is required for the views to. |
64 | | == '''MODELS''' == |
65 | | === 1st_run.py (This will run before the modified version of 000_config) === |
66 | | |
67 | | |
68 | | ==== Session variable : session.path_to_config ==== |
69 | | This will initialize a session variable that will help us get the status of the selector. If the session variable is “none” we can initialize it to “”, and later in the controller it can be set to the path of 000_config of that particular eden they want the to the web-setup to run on. |
70 | | This session variable will help us to get the path of the 000_config from the controllers. |
71 | | |
72 | | ==== Parsing 000_config.py ==== |
73 | | |
74 | | Once we get the path of 000_config we need to copy that file in the websetup models by the the name of modified_config.py so that it shall run after this file closes. Now open modified_config using os.path.join in the “w” mode and 000_config in the “r” mode. We need to read 000_config and |
75 | | This would result in the creation of 2 dicts one is deployment_settings and the other one is for the modules deployment_settings.modules .Now 6th and 7th steps will help us to maintain the dicts for modules that were turned off by commenting them. |
76 | | {{{ |
77 | | #!html |
78 | | <p class=MsoListParagraphCxSpMiddle style='margin-left:0cm'>---------------------------------------------------------------------------------------------------------------------------------------------------------</p> |
79 | | <p style='color:#595959'>1.Remove the line containing <b>“s3base.s3config(” </b>from |
80 | | the starting of the file</p> |
81 | | |
82 | | <p class=MsoListParagraphCxSpMiddle style='margin-left:0cm'><span |
83 | | style='color:#595959'> </span></p> |
84 | | |
85 | | <p class=MsoListParagraphCxSpMiddle style='margin-left:0cm'><span |
86 | | style='color:#595959'>2. Insert </span></p> |
87 | | |
88 | | <p class=MsoListParagraphCxSpMiddle style='margin-left:0cm'><b><span |
89 | | style='color:#595959'>“ from gluon.storage import Storage</span></b></p> |
90 | | |
91 | | <p class=MsoListParagraphCxSpMiddle style='margin-left:0cm'><b><span |
92 | | style='color:#595959'>from gluon.contrib.simplejson.ordered_dict import |
93 | | OrderedDict</span></b></p> |
94 | | |
95 | | <p class=MsoListParagraphCxSpMiddle style='margin-left:0cm'><b><span |
96 | | style='color:#595959'>deployment_settings = Storage( “</span></b><span |
97 | | style='color:#595959'> </span></p> |
98 | | |
99 | | <p class=MsoListParagraphCxSpLast style='margin-left:0cm'><span |
100 | | style='color:#595959'>before the first line where they find “deployment_settings.” |
101 | | Without a “<b>#</b>” in the 000_config.py </span></p> |
102 | | |
103 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
104 | | style='color:#595959'>3. And add <b>“ ) ”</b> Immediately before the import of |
105 | | storage and remove the import of storage from there </span></p> |
106 | | |
107 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
108 | | style='color:#595959'> </span></p> |
109 | | |
110 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
111 | | style='color:#595959'>4. Add 4 spaces to each line between “<b>Storage(</b>“ |
112 | | and “<b>)</b>” even the commented ones </span></p> |
113 | | |
114 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
115 | | style='color:#595959'> </span></p> |
116 | | |
117 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
118 | | style='color:#595959'>5<b>.</b> Make the following to the lines except the ones |
119 | | containing “#” before the use of “<b>deployment_settings.</b>” </span></p> |
120 | | |
121 | | <p class=MsoListParagraphCxSpFirst style='margin-bottom:0cm;margin-bottom:.0001pt; |
122 | | text-indent:-18.0pt'><span style='font-family:Wingdings;color:#595959'>v<span |
123 | | style='font:7.0pt "Times New Roman"'> </span></span><span |
124 | | style='color:#595959'>Wrap each word containing “<b>deployment_settings.</b>” |
125 | | with “” </span></p> |
126 | | |
127 | | <p class=MsoListParagraphCxSpLast style='margin-bottom:0cm;margin-bottom:.0001pt; |
128 | | text-indent:-18.0pt'><span style='font-family:Wingdings;color:#595959'>v<span |
129 | | style='font:7.0pt "Times New Roman"'> </span></span><span |
130 | | style='color:#595959'>Add a <b>“,”(coma)</b> after the line </span></p> |
131 | | |
132 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
133 | | style='color:#595959'> </span></p> |
134 | | |
135 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
136 | | style='color:#595959'>6. Check if the </span></p> |
137 | | |
138 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><b><span |
139 | | style='color:#595959'>“<?module_name?> = Storage( \n” </span></b><span |
140 | | style='color:#595959'>has a “#” in the same line then turn </span></p> |
141 | | |
142 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
143 | | style='color:#595959'>module[module_name] ( variable in layout.py in modules |
144 | | ) off .</span></p> |
145 | | |
146 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
147 | | style='color:#595959'> </span></p> |
148 | | |
149 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
150 | | style='color:#595959'>7<b>.</b>Remove “#” from there till the line you get <b>“#),” |
151 | | </b></span></p> |
152 | | |
153 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>----------------------------------------------------------------------------------------------------------------------------------------------------------</p> |
154 | | |
155 | | }}} |
156 | | ==== Handling database conflicts ==== |
157 | | There should be a list that will keep a list of databse_name and database_types of 2 eden application cannot be same at same time therefore a list of database types and databse names needs to be made |
158 | | |
159 | | * For this we will first have to generate a list paths .We can search for “Copyright: 2010 (c) Sahana Software Foundation” in all the LICENSE files of applications. |
160 | | |
161 | | Then we will have to search in the list of paths for specific keywords like “deployment_setting.database.database” This can be done using regex command in grep |
162 | | |
163 | | {{{ |
164 | | |
165 | | If path(variable) is in the list of paths containing: |
166 | | Command_line = “grep ” + “deployment_setting.database.database” + “path” |
167 | | Line = subprocess.Popen(command_line); |
168 | | |
169 | | }}} |
170 | | |
171 | | Now search the file for deployment_settings.database.db_type .These list will help in validating for the database values. |
172 | | |
173 | | === modified_config.py (Parsed Version OF 000_config.py ) === |
174 | | |
175 | | It will initialize and define the dict for all the settings and the modules of whose we have mentioned before. |
176 | | This part of the code has not been done before. I expect to take a week at max. to complete this code. |
177 | | |
| 33 | As the values are taken from the current 000_config and s3cfg.py and then used thus there is no problem even if an old instance is used in websetup to change the settings. These values in the forms reflect the current values of 000_config.py |
203 | | {{{ |
204 | | #!html |
205 | | |
206 | | <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 |
207 | | style='border-collapse:collapse;border:none'> |
208 | | <tr> |
209 | | <td width=297 valign=top style='width:178.0pt;border:solid windowtext 1.0pt; |
210 | | padding:0cm 5.4pt 0cm 5.4pt'> |
211 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
212 | | normal'><span style='color:#0D0D0D'>Module name</span></p> |
213 | | </td> |
214 | | <td width=297 valign=top style='width:178.05pt;border:solid windowtext 1.0pt; |
215 | | border-left:none;padding:0cm 5.4pt 0cm 5.4pt'> |
216 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
217 | | normal'><span style='color:#0D0D0D'> </span></p> |
218 | | <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 |
219 | | style='border-collapse:collapse;border:none'> |
220 | | <tr> |
221 | | <td width=278 valign=top style='width:166.5pt;border:solid windowtext 1.0pt; |
222 | | padding:0cm 5.4pt 0cm 5.4pt'> |
223 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt; |
224 | | line-height:normal'><span style='color:#0D0D0D'>Checkboxes for access level |
225 | | </span></p> |
226 | | </td> |
227 | | </tr> |
228 | | <tr> |
229 | | <td width=278 valign=top style='width:166.5pt;border:solid windowtext 1.0pt; |
230 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
231 | | <p class=MsoListParagraph style='margin-top:0cm;margin-right:0cm; |
232 | | margin-bottom:0cm;margin-left:18.0pt;margin-bottom:.0001pt;text-indent: |
233 | | -18.0pt;line-height:normal'><span style='font-family:"Courier New"; |
234 | | color:#0D0D0D'>o<span style='font:7.0pt "Times New Roman"'> </span></span><span |
235 | | style='color:#0D0D0D'>Admin</span></p> |
236 | | </td> |
237 | | </tr> |
238 | | <tr> |
239 | | <td width=278 valign=top style='width:166.5pt;border:solid windowtext 1.0pt; |
240 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
241 | | <p class=MsoListParagraph style='margin-top:0cm;margin-right:0cm; |
242 | | margin-bottom:0cm;margin-left:18.0pt;margin-bottom:.0001pt;text-indent: |
243 | | -18.0pt;line-height:normal'><span style='font-family:"Courier New"; |
244 | | color:#0D0D0D'>o<span style='font:7.0pt "Times New Roman"'> </span></span><span |
245 | | style='color:#0D0D0D'>Anonymous </span></p> |
246 | | </td> |
247 | | </tr> |
248 | | <tr> |
249 | | <td width=278 valign=top style='width:166.5pt;border:solid windowtext 1.0pt; |
250 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
251 | | <p class=MsoListParagraph style='margin-top:0cm;margin-right:0cm; |
252 | | margin-bottom:0cm;margin-left:18.0pt;margin-bottom:.0001pt;text-indent: |
253 | | -18.0pt;line-height:normal'><span style='font-family:"Courier New"; |
254 | | color:#0D0D0D'>o<span style='font:7.0pt "Times New Roman"'> </span></span><span |
255 | | style='color:#0D0D0D'>Only Division users</span></p> |
256 | | </td> |
257 | | </tr> |
258 | | <tr> |
259 | | <td width=278 valign=top style='width:166.5pt;border:solid windowtext 1.0pt; |
260 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
261 | | <p class=MsoListParagraph style='margin-top:0cm;margin-right:0cm; |
262 | | margin-bottom:0cm;margin-left:18.0pt;margin-bottom:.0001pt;text-indent: |
263 | | -18.0pt;line-height:normal'><span style='font-family:"Courier New"; |
264 | | color:#0D0D0D'>o<span style='font:7.0pt "Times New Roman"'> </span></span><span |
265 | | style='color:#0D0D0D'>None </span></p> |
266 | | </td> |
267 | | </tr> |
268 | | </table> |
269 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
270 | | normal'><span style='color:#0D0D0D'> </span></p> |
271 | | </td> |
272 | | <td width=297 valign=top style='width:178.05pt;border:solid windowtext 1.0pt; |
273 | | border-left:none;padding:0cm 5.4pt 0cm 5.4pt'> |
274 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
275 | | normal'><span style='color:#0D0D0D'> ?help</span></p> |
276 | | </td> |
277 | | </tr> |
278 | | <tr> |
279 | | <td width=297 valign=top style='width:178.0pt;border:solid windowtext 1.0pt; |
280 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
281 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
282 | | normal'><span style='color:#0D0D0D'>Module nice name</span></p> |
283 | | </td> |
284 | | <td width=297 valign=top style='width:178.05pt;border-top:none;border-left: |
285 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
286 | | padding:0cm 5.4pt 0cm 5.4pt'> |
287 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
288 | | normal'><span style='color:#0D0D0D'>Textbox </span></p> |
289 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
290 | | normal'><span style='color:#0D0D0D'>(with correct width)</span></p> |
291 | | </td> |
292 | | <td width=297 valign=top style='width:178.05pt;border-top:none;border-left: |
293 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
294 | | padding:0cm 5.4pt 0cm 5.4pt'> |
295 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
296 | | normal'><span style='color:#0D0D0D'> </span></p> |
297 | | </td> |
298 | | </tr> |
299 | | <tr> |
300 | | <td width=297 valign=top style='width:178.0pt;border:solid windowtext 1.0pt; |
301 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
302 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
303 | | normal'><span style='color:#0D0D0D'>Module Description </span></p> |
304 | | </td> |
305 | | <td width=297 valign=top style='width:178.05pt;border-top:none;border-left: |
306 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
307 | | padding:0cm 5.4pt 0cm 5.4pt'> |
308 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
309 | | normal'><span style='color:#0D0D0D'>Textbox</span></p> |
310 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
311 | | normal'><span style='color:#0D0D0D'>(with correct width)</span></p> |
312 | | </td> |
313 | | <td width=297 valign=top style='width:178.05pt;border-top:none;border-left: |
314 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
315 | | padding:0cm 5.4pt 0cm 5.4pt'> |
316 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
317 | | normal'><span style='color:#0D0D0D'> </span></p> |
318 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
319 | | normal'><span style='color:#0D0D0D'> </span></p> |
320 | | </td> |
321 | | </tr> |
322 | | <tr> |
323 | | <td width=297 valign=top style='width:178.0pt;border:solid windowtext 1.0pt; |
324 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
325 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
326 | | normal'><span style='color:#0D0D0D'> </span></p> |
327 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
328 | | normal'><span style='color:#0D0D0D'>BACK(after the last module)</span></p> |
329 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
330 | | normal'><span style='color:#0D0D0D'> </span></p> |
331 | | </td> |
332 | | <td width=297 valign=top style='width:178.05pt;border-top:none;border-left: |
333 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
334 | | padding:0cm 5.4pt 0cm 5.4pt'> |
335 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
336 | | normal'><span style='color:#0D0D0D'> </span></p> |
337 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
338 | | normal'><span style='color:#0D0D0D'>NEXT(after the last module)</span></p> |
339 | | </td> |
340 | | <td width=297 valign=top style='width:178.05pt;border-top:none;border-left: |
341 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
342 | | padding:0cm 5.4pt 0cm 5.4pt'> |
343 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
344 | | normal'><span style='color:#0D0D0D'> </span></p> |
345 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
346 | | normal'><span style='color:#0D0D0D'>SAVE AND QUIT(after the last module )</span></p> |
347 | | </td> |
348 | | </tr> |
349 | | </table> |
350 | | |
351 | | }}} |
352 | | |
353 | | * There will be similar forms for the settings; however I would like to have separate forms for different categories of settings. Like thsese:- |
| 70 | * There will be similar forms for the settings. However I would like to have separate forms for different categories of settings. Like thsese:- |
355 | | |
356 | | {{{ |
357 | | #!html |
358 | | |
359 | | <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 |
360 | | style='border-collapse:collapse;border:none'> |
361 | | <tr> |
362 | | <td width=328 valign=top style='width:196.8pt;border:solid windowtext 1.0pt; |
363 | | padding:0cm 5.4pt 0cm 5.4pt'> |
364 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
365 | | normal'><span style='color:#0D0D0D'>SETTINGS CATEGORY</span></p> |
366 | | </td> |
367 | | <td width=260 valign=top style='width:155.9pt;border:solid windowtext 1.0pt; |
368 | | border-left:none;padding:0cm 5.4pt 0cm 5.4pt'> |
369 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
370 | | normal'><span style='color:#0D0D0D'>(before the first setting only)</span></p> |
371 | | </td> |
372 | | <td width=302 valign=top style='width:181.4pt;border:solid windowtext 1.0pt; |
373 | | border-left:none;padding:0cm 5.4pt 0cm 5.4pt'> |
374 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
375 | | normal'><span style='color:#0D0D0D'> </span></p> |
376 | | </td> |
377 | | </tr> |
378 | | <tr> |
379 | | <td width=328 valign=top style='width:196.8pt;border:solid windowtext 1.0pt; |
380 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
381 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
382 | | normal'><span style='color:#0D0D0D'>Setting name</span></p> |
383 | | </td> |
384 | | <td width=260 valign=top style='width:155.9pt;border-top:none;border-left: |
385 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
386 | | padding:0cm 5.4pt 0cm 5.4pt'> |
387 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
388 | | normal'><span style='color:#0D0D0D'>FIELD according to the Input type |
389 | | required</span></p> |
390 | | </td> |
391 | | <td width=302 valign=top style='width:181.4pt;border-top:none;border-left: |
392 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
393 | | padding:0cm 5.4pt 0cm 5.4pt'> |
394 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
395 | | normal'><span style='color:#0D0D0D'> ?help</span></p> |
396 | | </td> |
397 | | </tr> |
398 | | <tr> |
399 | | <td width=328 valign=top style='width:196.8pt;border:solid windowtext 1.0pt; |
400 | | border-top:none;padding:0cm 5.4pt 0cm 5.4pt'> |
401 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
402 | | normal'><span style='color:#0D0D0D'> </span></p> |
403 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
404 | | normal'><span style='color:#0D0D0D'>BACK(after the last one only)</span></p> |
405 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
406 | | normal'><span style='color:#0D0D0D'> </span></p> |
407 | | </td> |
408 | | <td width=260 valign=top style='width:155.9pt;border-top:none;border-left: |
409 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
410 | | padding:0cm 5.4pt 0cm 5.4pt'> |
411 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
412 | | normal'><span style='color:#0D0D0D'> </span></p> |
413 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
414 | | normal'><span style='color:#0D0D0D'>NEXT(after the last one only)</span></p> |
415 | | </td> |
416 | | <td width=302 valign=top style='width:181.4pt;border-top:none;border-left: |
417 | | none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; |
418 | | padding:0cm 5.4pt 0cm 5.4pt'> |
419 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
420 | | normal'><span style='color:#0D0D0D'> </span></p> |
421 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height: |
422 | | normal'><span style='color:#0D0D0D'>SAVE AND QUIT(after the last on only)</span></p> |
423 | | </td> |
424 | | </tr> |
425 | | </table> |
426 | | }}} |
427 | | |
428 | | * ''For adding some text on the main page'' |
429 | | |
430 | | We will just set a text field in the form. Where he can type anything which he wants to be displayed at the main landing page of eden. I will set a global variable, that later I will write to the file 000_config.Then a division would be created in the index page of eden for displaying simple text. |
431 | | |
432 | | In the form.accepts you will need to set the module values according to the request.post_vars. |
533 | | |
534 | | == '''PROJECT IMPLEMENTATION SUMMMARY''' == |
535 | | |
536 | | |
537 | | === Getting the dictionary for the settings and the module name and status === |
538 | | |
539 | | § We can change s3cnfg in such that the values of the dict are set just before the respective function of the key. This dict will mainly store the following things about the settings |
540 | | Category, Field ids, Description, Nice name, Jquery Validation, Input type, Options etc |
541 | | (These things will be required by the index function of the web setup) |
542 | | § We will also copy this file in the models so that we can run this file and thus defining our dict. |
543 | | |
544 | | § The copying script (which copies the s3cnfg) should be kept in the controllers do that the next time the models are run the file with the dict also runs. |
545 | | |
546 | | § Creating this dict in s3cnfg will help to maintain the settings dict in case the settings are increased or changed |
547 | | |
548 | | |
549 | | |
550 | | === Getting the default values of the settings and the default status of the Modules === |
551 | | |
552 | | § We shall parse the 000_config file so that it contains a dict of all the default values of settings and the values of the module. |
553 | | |
554 | | § The parsing script should be kept in the controllers. The parsed file is transferred to the models, so that when the next time the models, run the file with the dict also runs. |
555 | | |
556 | | |
557 | | |
558 | | === Forms === |
559 | | |
560 | | Once we have the dict of settings and modules and also there default values and status respectively we can directly go the main index function of the controllers that create forms. |
561 | | The data copied from the s3confg file will be extremely useful for this stage. |
562 | | I have also uploaded some ui mokups at (http://eden.sahanafoundation.org/wiki/BluePrint/WebSetup#Defindex:) |
563 | | |
564 | | === Writing changes back in the Eden === |
565 | | |
566 | | We can use os.path to write the changes back into the 000_config. For this we shall use the modified dict (after he has changed what he wanted). The modilfed 000_config we be like the in the same format as the old one. |
567 | | |