Changes between Version 11 and Version 12 of DeveloperGuidelinesNewModule


Ignore:
Timestamp:
01/02/09 03:26:20 (16 years ago)
Author:
Fran Boon
Comment:

crud_strings_%resource% moved to modules model

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesNewModule

    v11 v12  
    3030}}}
    3131
    32 Add additional tables to this file, as-required.
    33 
     32Add additional tables to this file, as-required.[[BR]]
    3433To avoid namespace clashes, use the format: {{{db.module_table}}}
    35 
    36 Add a section for messages for your resources to {{{models/_db.py}}}:
     34Also add the messages for your resources:
    3735{{{
    38 def shn_crud_strings_lookup(resource):
    39     "Look up CRUD strings for a given resource."
    40     elif resource=='shelter':
    41         return Storage(title_create=T('Add Shelter'),
     36crud_strings_shelter=Storage(title_create=T('Add Shelter'),
    4237            title_display=T('Organisation Details'),
    4338            title_list=T('List Shelters'),
     
    5247            msg_list_empty=T('No Shelters currently registered'))
    5348}}}
    54 
    5549Copy/paste & do just a few small tweaks once pasted:
    56  * Search/Replace 'Organisation' with Your_resource
    57  * Fix plurals, if required (e.g. Persons -> People, Classs to Classes, Metadatas -> Metadata)
     50 * Search/Replace 'Shelter' with Your_resource
     51 * Fix plurals, if required (e.g. Persons -> People, Classs -> Classes, Metadatas -> Metadata)
    5852
    5953=== Controller ===