Changes between Version 5 and Version 6 of BluePrint/WebSetup
- Timestamp:
- 08/21/11 07:29:02 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrint/WebSetup
v5 v6 71 71 [[BR]] 72 72 73 74 '''Other Functions made to help index()''' 75 76 * def create_new_eden():[[BR]] 77 This function is used to create new eden . It copies the content from the current instance into a new folder with the given name. It also uses bzr if present to update the code bu downloading the revisions . 78 [[BR]] 79 80 * def get_input_type():[[BR]] 81 This function is used to create a dropdown menu or checkboxes for the given field. It also access the options to be made 82 73 83 ==== Def write_out(): ==== 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. 120 87 121 88 == '''VIEWS''' == … … 123 90 Though we have not talked about this part directly, however in the last section of index(): function we have talked about the forms that I would like to create. Most part of this code can be reused from the previous application. 124 91 125 === Creating a license page : === 126 This will be created only if “FINISHED_EDITING_CONFIG_FILE” is false in the modified_config.py 127 128 === Sending Post Method To Get The Arguments To Controllers : === 129 130 === These Will Contain A Static Folder Containing The Css And The ExtJS: === 131 132 This part of the code is almost reusable. 92 This part extensively uses jquery to create tabs and and also the css to create a good color scheme. Thus the form is generated only once and all the other 93 navigaion is done through jquery thus making it much faster and convenient to use. 133 94 134 95 == '''WEB SETUP NEW ARCHITECTURE''' == … … 156 117 157 118 158 == '''WEB SETUP OLD ARCHITECTURE''' ==159 [[Image(http://www.picamatic.com/show/2011/04/08/04/42/7470363_1818x880.png)]]