Changes between Version 19 and Version 20 of BluePrintRESTImplementation


Ignore:
Timestamp:
01/02/09 03:30:50 (13 years ago)
Author:
Fran Boon
Comment:

Resource strings now defined in module.py :)

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintRESTImplementation

    v19 v20  
    22
    33== Model ==
    4 {{{
    5 def shn_crud_strings_lookup(resource):
    6     "Look up CRUD strings for a given resource."
    7     if resource=='shelter':
    8         return Storage(title_create=T('Add Shelter'),
     4{{{models/module.py}}}
     5{{{
     6crud_strings_shelter=Storage(title_create=T('Add Shelter'),
    97            title_display=T('Organisation Details'),
    108            title_list=T('List Shelters'),
     
    1816            msg_record_deleted=T('Shelter deleted'),
    1917            msg_list_empty=T('No Shelters currently registered'))
    20     else:
    21         # Undefined Resource!
    22         return
     18}}}
     19
     20{{{models/_db.py}}}
     21{{{
     22def shn_crud_strings_lookup(resource):
     23    "Look up CRUD strings for a given resource."
     24    return eval('crud_strings_%s' % resource)
    2325
    2426def shn_rest_controller(module,resource):