Changes between Version 4 and Version 5 of BluePrint/WebSetup


Ignore:
Timestamp:
08/21/11 03:29:27 (14 years ago)
Author:
anubhavagg929
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/WebSetup

    v4 v5  
    11[[TOC]]                         
    22= WEB SETUP IMPLEMENTATION (Detail)=
     3== '''MODELS''' ==
     4=== default.py ===
    35
    4 == '''MODULES'''''''
    5    
    6 === Layout.py ===
    7 ==== Dict of settings ====
     6* '''session.SelectorCheck'''
     7  :It is a boolean value that checks if an eden instance is selected or not .It helps the controllers to decide whether to show the selector screen or not.
    88
    9 We will copy this file from Eden ( s3cfg can be changed to generated this file during its run )into the modules of Web Setup and make it run. These would be locally imported in the Models so they will be executed first:
    10              “categary”.”field_id”
    11                    
    12 Like:-
     9* '''dict of libraries'''
     10  :These contain the information about lxml,reportlabs,xlwt,shapely and geos libraries . It helps to test the presence of these libraries and also give links to where they could be downloaded .
    1311{{{
    14 #!python
    15  Settings = {"databse.db_type" : {"nice_name" :T("Database"),
    16                                   "description":T("Database Type: "),
    17                                   "input_type":"select",
    18                                   "options":['sqlite', 'sql', 'mysql'],
    19                                   "jquery_validation_requirements”: "required lettersonly"
    20                                  },
    21              #and similarly other options for language can be set
    22             }
    23        
     12libraries = {
     13    'lxml':
     14        {
     15            'name': 'lxml',
     16            'description': 'To import and export XML, you need to install lxml',
     17            'link': 'http://codespeak.net/lxml/installation.html'
     18        },
     19}
    2420}}}
    2521
    26 These are really useful for views as this provide the information regarding input type, the value to select from, the field name and the validation requirement. These layouts are mostly for the views. Some of these like port will also contain a validation field for the range of accepted values.
    27 
    28 ==== Change in s3cfig to generate the dict shown above ====
    29 
    30 {{{
    31 
    32 changing s3cfg to generate this dict
    33 
    34 1. Write
    35     a."settings = {" in the starting of the dict
    36     b.settings_type + "." + settings_name in each get function
    37     c.also specify the details like input type over there.
    38    
    39 
    40 }}}
    41 
    42 Thus only s3cfg will contain all the dict .
    43 
    44 After gsoc we can also change s3cfg in the starting to generate 000_config if it is the first time of run
    45 
    46 ==== Dict of Modules ====
    4722
    4823
    49 These needs to store the names of the modules:-
     24=== parsed_config.py===
     25It actually consists of s3cfg.py and 000_config.py written one after the other . When this code is allowed to run we get the dict of all the deployment settings can easily be obtained .[[BR]]
     26The s3cfg.py contains docstring in each get function . These doctstring contain the information like:-
     27* '''type''' : which type of the input field is required in the forms
     28* '''category''' : which category to the setting belong.
     29* '''name''' : The name of the setting
     30* '''options''' :The list of values shown in the dropdown
     31The 000_config also has disabled module dictionary . This is really important for the cases when an module was initially deactivated and later activated.
    5032
    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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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"'>&nbsp; </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"'>&nbsp; </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'>“&lt;?module_name?&gt; = 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 
     33As 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
    17834
    17935== '''CONTROLLERS''' ==
     
    18238==== Def selector(): ====
    18339If the session variable of the path is not set then I redirect the user from the index function to this function of the controller.
    184 *       I will access the list of paths generated in the models while solving the database conflicts
    185 *       And then there is a drop down menu to select the path ( the user will select the name, I will retrieve the path using the request.post_vars in the form.accepts and then set the path accordingly).We can create forms using  SELECT() function for the dropdown and FIELDSET() for creating a filed in the form
    186 
    187 *       This function will also contain a field for creating a new eden
    188 Selector will also contain an option for creating new eden . This should be need no network excess, I will execute statement by “exec” for copying the files from the existing eden to a new eden with a new name.
    189 I will copy all the files except a few files like database logs, session and some other which are developed after you run the first time. After the script has run successfully
    190 
    191 This part of the code should not take more than 4 days to code.
     40*       I create a the list of paths of all the eden applications( Identified by license file in the folder )
     41*       And then there is a drop down menu to select the path ( the user will select the name, I retrieve the path using the request.post_vars in the form.accepts and then set the path accordingly).We create forms using  SELECT() function for the dropdown and FIELDSET() for creating a filed in the form
    19242
    19343
    19444==== Def index(): ====
    195 If the session variable is set then this part is executed. The main purpose of this is to create forms according to the needs. We will have a submit ,back and next button on the every form .
     45If the session variable is set then this part is executed. The main purpose of this is to create forms according to the needs and the docstrings written in the s3cfg.py . This part parses those data to retrieve the input fields ,name and category of settings .[[BR]]
    19646
    197 There should be a login form that would verify that admin is making changes in the settings. For this we will have to contact the database of the selected Eden.
     47As for modules all the module mentioned in the docstring of the get_module() function is used.[[BR]]
    19848
    199 The TABLE() function will be extremely useful for setting the user interface and SELECT() function for defining dropboxes. INPUT() will help us define check boxes and other input types. All the fields stored in modules for every setting will be sent to the user using INPUT() (jquery validation requirement, input type and default value ) and FIELDSET(for field id  and the keys of the,  setting variable are extremely important here)
     49This part also checks for the:-[[BR]]
     50* '''Module dependecies'''[[BR]]
     51  :I have mentioned all the dependencies in the docstring of the get_module()function. These are parsed and checked in this part.If any module is activated that needs other modules those other modules will be activated by themselves .
     52
     53* '''Core modules'''[[BR]]
     54  :I have removed the status option for the 4 core modules. Thus these modules cannot be deactivatted.
     55The Form is generated by followinf the following scheme :-[[BR]]
     56[[BR]]   
     57Form (Entire collection)[[BR]]
     58|[[BR]]
     59Fieldset (Categorizes Settings, modules or create new eden block)[[BR]]
     60|[[BR]]
     61Fieldset (Groups of settings)[[BR]]
     62|[[BR]]
     63Table (Optional) (Not everything uses a table this is just for organization)[[BR]]
     64|[[BR]]
     65Input/Element (Individual setting)[[BR]]
     66
    20067* Module Forms:
    20168[[BR]]
    20269
    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'>&nbsp;</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"'>&nbsp;&nbsp; </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"'>&nbsp;&nbsp; </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"'>&nbsp;&nbsp; </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"'>&nbsp;&nbsp; </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'>&nbsp;</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'>&nbsp;</span></p>
    318   <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    319   normal'><span style='color:#0D0D0D'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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:-
    35471[[BR]]
    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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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.
    43372
    43473==== Def write_out(): ====
     
    500139
    501140== '''Workflow And Summary''' ==
    502 === There are 2 methods to acivate the WebSetup : ===
     141=== Acivate the WebSetup : ===
     142 
     143* Going to the web setup co-application and select an Eden Instance .
    503144
    504   * Going directly to the web setup this will call the selector for the path of the correct Eden .
    505   This is extremely important in the case there are more than one Eden . For this database conflicts needs to be resolved and also the
    506 
    507   * Either clicking on the Setup on the index page of Eden .In this case selection is not needed as the session variable
    508   will be set from the URL post
    509 
    510 === After this, the file containing the dict of settings and modules in the Eden are copied in The modules of the Web setup and made to run. ===
    511   * if this is not possible i.e. the file containing the dict is not there then the s3cfg is copied and made to run so that the file containing
    512   the dict is made
    513   * please visit (http://eden.sahanafoundation.org/wiki/GSOCWebSetupImplementation#Dictofsettings) for further details
    514 
    515 === After this the 000_config is parsed to modified_config and made to run ===
    516   * This will initialize the default values of the dict and postulate the correct syntax of 000_config
    517   * please visit (http://eden.sahanafoundation.org/wiki/GSOCWebSetupImplementation#Parsing000_config.py) for the Algo
    518 
    519 === Then  we will generate a login page using the index ===
    520   * This will contact the database of the correct Eden to make the admin login if the the setup has been run once (this can be easily idebtified by the 000_config)
    521   * No login page if there is setup is run for the first time
     145=== s3cfg and 000_config copied ===
     146 * These are stored in the models of the co-application thus they will run as the selector screen is submitted.
    522147
    523148=== The forms for each setting is displayed ===
    524149  * these forms are generated using index
    525150  * there results are postulated using request.post_vars
    526   * please visit (http://eden.sahanafoundation.org/wiki/GSOCWebSetupImplementation#Defindex:) for exact forms
    527151
    528152=== The dict extracted from 000_config is writen to 000_config with the correct values ===
    529153  * This process is done in write_out ()
    530   * Please visit (http://eden.sahanafoundation.org/wiki/GSOCWebSetupImplementation#Defwrite_out:) for the algo
    531  
     154
    532155=== In the process I am also generating a method for creating new Eden without Netowrk Access ===
    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 
    568156 
    569157