[IMP] doc: specify the API examples are in python2

Odoo 11 is python 3 but the xmlrpc interface works with python 2 too.
The example should probably be migrated to use python 3.
In the meantime specify exactly these examples are python 2 to avoid the
confusion.

Fixes #24232
This commit is contained in:
Martin Trigaux
2018-04-17 13:59:50 +02:00
parent b8133aa64b
commit a87dc3111c
+2 -1
View File
@@ -1,7 +1,8 @@
from docutils import nodes, utils
from docutils.parsers.rst import Directive
from pygments.lexers import get_lexer_by_name
from pygments.lexers import get_lexer_by_name, PythonLexer
PythonLexer.name = 'Python 2'
def setup(app):
app.add_directive('switcher', SwitcherDirective)