diff options
| author | Olivier Laurent <olt@odoo.com> | 2015-09-15 14:55:28 +0200 |
|---|---|---|
| committer | Olivier Laurent <olt@odoo.com> | 2015-09-15 14:58:23 +0200 |
| commit | 883390863a2ec0663590c9908423c698be32fca3 (patch) | |
| tree | 3b627f9e83aab3902bafc9b5e8909626ba766dc0 /doc/reference/upgrade_api.rst | |
| parent | adb17252cb70da01efb01ebd6dd82af2808c0c49 (diff) | |
[FIX] doc: upgrade_api: slight fix
small fix in example for creating a request
DB_SOURCE was not defined. FILENAME was to be used.
Also reordered the fields so as to have the most important ones at the
beginning.
Diffstat (limited to 'doc/reference/upgrade_api.rst')
| -rw-r--r-- | doc/reference/upgrade_api.rst | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/doc/reference/upgrade_api.rst b/doc/reference/upgrade_api.rst index 0581e2bf614..d136ce8314b 100644 --- a/doc/reference/upgrade_api.rst +++ b/doc/reference/upgrade_api.rst @@ -71,7 +71,7 @@ The list of errors. A list of dictionaries, each dictionary giving information about one particular error. Each dictionary can contain various keys depending of the type of error -but you will always get the *reason* and the *message* keys: +but you will always get the ``reason`` and the ``message`` keys: * ``reason``: the error type * ``message``: a human friendly message @@ -150,19 +150,17 @@ Here are 2 examples of database upgrade request creation using: CREATE_URL = "https://upgrade.odoo.com/database/v1/create" CONTRACT = "M123456-abcdef" - AIM = "test" - TARGET = "8.0" EMAIL = "john.doe@example.com" + TARGET = "8.0" + AIM = "test" FILENAME = "db_name.dump" - fields = dict([ - ('aim', AIM), - ('email', EMAIL), - ('filename', DB_SOURCE), + postfields = urlencode([ ('contract', CONTRACT), + ('email', EMAIL), ('target', TARGET), - ]) - postfields = urlencode(fields) + ('aim', AIM), + ('filename', FILENAME)]) c = pycurl.Curl() c.setopt(pycurl.URL, CREATE_URL) |
