doc/book/en/devrepo/devcore/reqbase.rst
changeset 10491 c67bcee93248
parent 10490 76ab3c71aff2
child 10492 68c13e0c0fc5
equal deleted inserted replaced
10490:76ab3c71aff2 10491:c67bcee93248
     1 Request and ResultSet methods
       
     2 -----------------------------
       
     3 
       
     4 Those are methods you'll find on both request objects and on
       
     5 repository session.
       
     6 
       
     7 Request methods
       
     8 ~~~~~~~~~~~~~~~
       
     9 
       
    10 `URL handling`:
       
    11 
       
    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 :).
       
    16 
       
    17 `Data formatting`:
       
    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
       
    29 
       
    30 
       
    31 Result set methods
       
    32 ~~~~~~~~~~~~~~~~~~
       
    33 
       
    34 * `get_entity(row, col)`, returns the entity corresponding to the data position
       
    35   in the *result set*
       
    36 
       
    37 * `complete_entity(row, col, skip_bytes=True)`, is equivalent to `get_entity` but
       
    38   also call the method `complete()` on the entity before returning it
       
    39 
       
    40