author | Julien Jehannet <julien.jehannet@logilab.fr> |
Fri, 03 Dec 2010 13:09:14 +0100 | |
branch | stable |
changeset 6731 | 3ea1f7a6311c |
parent 5400 | b7ab099b128a |
permissions | -rw-r--r-- |
5257
a31fbcfa8c3b
[doc/book] misc fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5149
diff
changeset
|
1 |
Request and ResultSet methods |
a31fbcfa8c3b
[doc/book] misc fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5149
diff
changeset
|
2 |
----------------------------- |
5149
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
3 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
4 |
Those are methods you'll find on both request objects and on |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
5 |
repository session. |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
6 |
|
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
7 |
Request methods |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
8 |
~~~~~~~~~~~~~~~ |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
9 |
|
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
10 |
`URL handling`: |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
11 |
|
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
12 |
* `build_url(*args, **kwargs)`, returns an absolute URL based on the |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
13 |
given arguments. The *controller* supposed to handle the response, |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
14 |
can be specified through the first positional parameter (the |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
15 |
connection is theoretically done automatically :). |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
16 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
17 |
`Data formatting`: |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
18 |
|
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
19 |
* `format_date(date, date_format=None, time=False)` returns a string for a |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
20 |
date time according to instance's configuration |
5149
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
21 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
22 |
* `format_time(time)` returns a string for a date time according to |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
23 |
instance's configuration |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
24 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
25 |
`And more...`: |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
26 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
27 |
* `tal_render(template, variables)`, renders a precompiled page template with |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
28 |
variables in the given dictionary as context |
5149
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
29 |
|
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
30 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
31 |
Result set methods |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
32 |
~~~~~~~~~~~~~~~~~~ |
5149
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
33 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
34 |
* `get_entity(row, col)`, returns the entity corresponding to the data position |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
35 |
in the *result set* |
5149
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
36 |
|
5400
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
37 |
* `complete_entity(row, col, skip_bytes=True)`, is equivalent to `get_entity` but |
b7ab099b128a
[doc/book] various content fixes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
5394
diff
changeset
|
38 |
also call the method `complete()` on the entity before returning it |
5149
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
39 |
|
a6bcb3c264fe
temporary move
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5147
diff
changeset
|
40 |