| 74 | | {{{ |
| 75 | | #!html |
| 76 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>This writes |
| 77 | | data to 000_config</p> |
| 78 | | |
| 79 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>For this |
| 80 | | they would need to open the config using os.path.join and write data to the |
| 81 | | config in the correct format. </p> |
| 82 | | |
| 83 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>Like modules |
| 84 | | needs to be done in this format:-</p> |
| 85 | | }}} |
| 86 | | {{{ |
| 87 | | “deployment_settings.modules = Storge(\n” + |
| 88 | | |
| 89 | | #For for all keys |
| 90 | | “ “ + <?module.key?> "= Storage(\n” + |
| 91 | | |
| 92 | | #For all keys in module.keys |
| 93 | | “ “ + “ ” + <?keys of module.keys?> + “=” + <?values of their respective fields?> + “,\n” + |
| 94 | | |
| 95 | | " " + “),\n” #after module.key |
| 96 | | |
| 97 | | + “)” #for the main |
| 98 | | }}} |
| 99 | | {{{ |
| 100 | | #!html |
| 101 | | |
| 102 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>Writing |
| 103 | | settings will be much more easier, as they are not stored in dict, somewhat |
| 104 | | like:-</p> |
| 105 | | |
| 106 | | }}} |
| 107 | | {{{ |
| 108 | | For all keys of settings |
| 109 | | <?Keys of the settings ?> + “=” + <?values of the respective keys?> “\n” |
| 110 | | }}} |
| 111 | | {{{ |
| 112 | | #!html |
| 113 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>I would |
| 114 | | write default values if any request.post_var returns an invalid value according |
| 115 | | to the validation.</p> |
| 116 | | |
| 117 | | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
| 118 | | style='color:#0D0D0D'> </span></p> |
| 119 | | }}} |
| | 84 | '''This writes data to 000_config'''[[BR]] |
| | 85 | For this they would need to open the config using os.path.join and write data to the config in the correct format.[[BR]] |
| | 86 | This function extensively uses the modify() function to convert the dict of the deployment settings and and modules to convert into a python sytax which can be written to the 000_config. |