| 421 | |
| 422 | ==== Def write_out(): ==== |
| 423 | |
| 424 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'> </p> |
| 425 | |
| 426 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>This writes |
| 427 | data to 000_config</p> |
| 428 | |
| 429 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>For this |
| 430 | they would need to open the config using os.path.join and write data to the |
| 431 | config in the correct format. </p> |
| 432 | |
| 433 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>Like modules |
| 434 | needs to be done in this format:-</p> |
| 435 | }}} |
| 436 | {{{ |
| 437 | “deployment_settings.modules = Storge(\n” + |
| 438 | |
| 439 | #For for all keys |
| 440 | “ “ + <?module.key?> "= Storage(\n” + |
| 441 | |
| 442 | #For all keys in module.keys |
| 443 | “ “ + “ ” + <?keys of module.keys?> + “=” + <?values of their respective fields?> + “,\n” + |
| 444 | |
| 445 | " " + “),\n” #after module.key |
| 446 | |
| 447 | + “)” #for the main |
| 448 | }}} |
| 449 | {{{ |
| 450 | #!html |
| 451 | |
| 452 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>Writing |
| 453 | settings will be much more easier, as they are not stored in dict, somewhat |
| 454 | like:-</p> |
| 455 | |
| 456 | }}} |
| 457 | {{{ |
| 458 | For all keys of settings |
| 459 | <?Keys of the settings ?> + “=” + <?values of the respective keys?> “\n” |
| 460 | }}} |
| 461 | {{{ |
| 462 | #!html |
| 463 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'>I would |
| 464 | write default values if any request.post_var returns an invalid value according |
| 465 | to the validation.</p> |
| 466 | |
| 467 | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span |
| 468 | style='color:#0D0D0D'> </span></p> |
| 469 | }}} |
| 470 | |