doc/book/en/devrepo/devcore/reqbase.rst
branchstable
changeset 5400 b7ab099b128a
parent 5394 105011657405
equal deleted inserted replaced
5399:03c641ae00a6 5400:b7ab099b128a
     1 Request and ResultSet methods
     1 Request and ResultSet methods
     2 -----------------------------
     2 -----------------------------
     3 
     3 
     4 Those are methods you'll find on both request objects and on repository session:
     4 Those are methods you'll find on both request objects and on
       
     5 repository session.
     5 
     6 
     6 :URL handling:
     7 Request methods
     7   * `build_url(*args, **kwargs)`, returns an absolute URL based on the
     8 ~~~~~~~~~~~~~~~
     8     given arguments. The *controller* supposed to handle the response,
       
     9     can be specified through the first positional parameter (the
       
    10     connection is theoretically done automatically :).
       
    11 :Data formatting:
       
    12   * `format_date(date, date_format=None, time=False)` returns a string for a
       
    13     date time according to instance's configuration
       
    14 
     9 
    15   * `format_time(time)` returns a string for a date time according to
    10 `URL handling`:
    16     instance's configuration
       
    17 
    11 
    18 :And more...:
    12 * `build_url(*args, **kwargs)`, returns an absolute URL based on the
       
    13   given arguments. The *controller* supposed to handle the response,
       
    14   can be specified through the first positional parameter (the
       
    15   connection is theoretically done automatically :).
    19 
    16 
    20   * `tal_render(template, variables)`, renders a precompiled page template with
    17 `Data formatting`:
    21     variables in the given dictionary as context
    18 
       
    19 * `format_date(date, date_format=None, time=False)` returns a string for a
       
    20   date time according to instance's configuration
       
    21 
       
    22 * `format_time(time)` returns a string for a date time according to
       
    23   instance's configuration
       
    24 
       
    25 `And more...`:
       
    26 
       
    27 * `tal_render(template, variables)`, renders a precompiled page template with
       
    28   variables in the given dictionary as context
    22 
    29 
    23 
    30 
    24 Result set methods:
    31 Result set methods
       
    32 ~~~~~~~~~~~~~~~~~~
    25 
    33 
    26   * `get_entity(row, col)`, returns the entity corresponding to the data position
    34 * `get_entity(row, col)`, returns the entity corresponding to the data position
    27     in the *result set*
    35   in the *result set*
    28 
    36 
    29   * `complete_entity(row, col, skip_bytes=True)`, is equivalent to `get_entity` but
    37 * `complete_entity(row, col, skip_bytes=True)`, is equivalent to `get_entity` but
    30     also call the method `complete()` on the entity before returning it
    38   also call the method `complete()` on the entity before returning it
    31 
    39 
    32 
    40