Changes for page Scripting
Last modified by Mohammad Humayun Khan on 2021/07/22
Change comment:
Added warning about older versions and python bug.
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -155,11 +155,16 @@ 155 155 %> 156 156 IP Address: $address{{/code}} 157 157 158 -= Python Example = 158 += Python Specific Information = 159 +You can run python code in XWiki just like velocity or groovy. 159 159 {{code language="python"}}{{python}} 160 160 print "The full name of this document is " + doc.getFullName() 161 161 {{/python}}{{/code}} 162 162 164 +{{warning}} 165 +Versions prior to [[XWiki Enterprise 2.4>>enterprise:Main.ReleaseNotesXWikiEnterprise24]] have a bug which prevents you from having access to the default objects (doc, xcontext, request, etc.) a [[workaround is available in the code zone>>code:Snippets.AccessToBindingsInPythonSnippet]] 166 +{{/warning}} 167 + 163 163 = Scripting In XWiki Syntax 1.0 = 164 164 165 165 XWiki Syntax 1.0 is rendered by an old rendering engine which still supported but for which no further development is planned (it will eventually be removed). Syntax 1.0 has some idiosyncrasies which were solved by syntax 2.0.