Changes between Version 60 and Version 61 of DeveloperGuidelinesNewModule


Ignore:
Timestamp:
11/29/13 22:26:45 (8 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesNewModule

    v60 v61  
    101101
    102102=== Controller ===
    103 Create a file: {{{/controllers/<MODULE NAME>.py}}}
     103Create a file: {{{controllers/<MODULE NAME>.py}}}
    104104
    105105Add controller functions for your resources, and an index() function for your controller's landing page:
     
    107107{{{
    108108module = request.controller
     109
     110if not settings.has_module(module):
     111    raise HTTP(404, body="Module disabled: %s" % module)
    109112
    110113def index():
     
    119122    """ RESTful CRUD controller """
    120123
    121     resource = request.function
    122     return s3_rest_controller(module, resource)
     124    return s3_rest_controller()
    123125}}}
    124126