Changes between Version 47 and Version 48 of DeveloperGuidelinesNewModule


Ignore:
Timestamp:
11/29/13 21:31:05 (8 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesNewModule

    v47 v48  
    1111
    1212'''Note'''
    13            - You need to Add your module to {{{private/templates/<template>/config.py}}}[[BR]]
    14            - Also, Add It to {{{models/00_tables.py}}}[[BR]]
     13 * Add your module to settings.modules in {{{private/templates/<template>/config.py}}} if it is for a specific template.
     14 * Add it to {{{private/templates/default/config.py}}} to provide an example of how your module should be entered in settings.modules.
     15 * Add an import statement to {{{models/00_tables.py}}}
    1516
    16 Add tables to modules/s3db/<MODULE NAME>.py file, as-required for your resources.[[BR]]
    17 To avoid namespace clashes, use the format: {{{s3db.module_table}}}
     17Add tables to modules/s3db/<MODULE NAME>.py file, as-required for your resources.
     18To avoid namespace clashes, use your module name as a prefix for table names.
     19Follow with underscore and the name of the resource your table represents: module_resource. Resource names should be unique.
    1820
    19 e.g. if building a Vehicle Management System, create s3db.vts_vehicle:
     21E.g. if building a Vehicle Management System, create s3db.vms_vehicle:
    2022{{{
    21 module = "org"
    22 resource = "organisation"
     23module = "vms"
     24resource = "vehicle"
    2325
    2426tablename = "%s_%s" % (module, resource)