Changes between Version 10 and Version 11 of S3/S3Method


Ignore:
Timestamp:
01/28/11 01:33:46 (14 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Method

    v10 v11  
    4747
    4848  '''Attributes:'''
    49   - '''manager''': the S3ResourceController instance
    50   - '''session''': the session store
    51   - '''request''': the web2py Request instance
    52   - '''response''': the web2py Response instance
    53   - '''T''': the global translator object
    54   - '''db''': the global DAL instance (database)
    55   - '''download_url''': the default download-URL
    56   - '''method''': string containing the requested method
     49  - self.'''manager''': the S3ResourceController instance
     50  - self.'''session''': the session store
     51  - self.'''request''': the web2py Request instance
     52  - self.'''response''': the web2py Response instance
     53  - self.'''T''': the global translator object
     54  - self.'''db''': the global DAL instance (database)
     55  - self.'''download_url''': the default download-URL
     56  - self.'''method''': string containing the requested method
    5757
    5858  '''Resource:'''
    59   - '''resource''': the S3Resource instance for the requested resource
    60   - '''prefix''': the application prefix ("Module" prefix)
    61   - '''name''': the name of the requested resource (without prefix)
    62   - '''table''': the corresponding database table
    63   - '''tablename''': the database table name
    64   - '''record''': the record ID specified in the URL
     59  - self.'''resource''': the S3Resource instance for the requested resource
     60  - self.'''prefix''': the application prefix ("Module" prefix)
     61  - self.'''name''': the name of the requested resource (without prefix)
     62  - self.'''table''': the corresponding database table
     63  - self.'''tablename''': the database table name
     64  - self.'''record''': the record ID specified in the URL
    6565
    6666  Note that, other than in {{{S3Request}}} instances, the resource attributes here refer to the target resource of the request, meaning, this would be the ''component'' if a component has been requested. To get at the parent resource, use {{{self.resource.parent}}}.
    6767
    6868  '''Methods:'''
    69   - '''permit''': check authorization (shortcut for auth.shn_has_permission)
    70   - '''_config''': gets a CRUD setting of the target table
    71   - '''_view''': finds the pathname of a custom view template
     69  - self.'''permit''': check authorization (shortcut for auth.shn_has_permission)
     70  - self.'''_config''': gets a CRUD setting of the target table
     71  - self.'''_view''': finds the pathname of a custom view template
    7272
    7373  '''Hooks:'''
    74   - '''next''': URL to redirect to after the current request has been completed, typically set by the method handler (Note: this redirection does never happen after GET)
     74  - self.'''next''': URL to redirect to after the current request has been completed, typically set by the method handler (Note: this redirection does never happen after GET)
    7575
    7676To implement a method handler as {{{S3Method}}}, you would typically subclass {{{S3Method}}} and implement the {{{apply_method}}} method: