i don't know how to do it, so perhaps someone can give a pointer, i take a
look at the book it seems i need to use ldap login
from gluon.contrib.login_methods.ldap_auth import ldap_auth
auth.settings.login_methods.append(ldap_auth(mode='ad',
server='my.domain.controller',
base_dn='ou=Users,dc=domain,dc=com'))
n for xml part, i don't know how to handle it, just start to learn from the
simple thing
*e.g.*
*controllers/default.py*
def test():
test_date = request.now
test_string = 'test string'
test_integer = 1
test_float = 0.2
test_list = [1, 2, 3]
test_tuple = (7, 8, 9)
test_dict = {'k0' : 'v', 'k1':3}
return dict(test_date = test_date,
test_string = test_string,
test_integer = test_integer,
test_float = test_float,
test_list = test_list,
test_tuple = test_tuple,
test_dict = test_dict)
*look into url http://127.0.0.1:8000/a/default/test.xml :*
<document>
<test_list>
<item>1</item>
<item>2</item>
<item>3</item>
</test_list>
<test_date>2016-12-07 06:45:04.252299</test_date>
<test_integer>1</test_integer>
<test_float>0.2</test_float>
<test_tuple>(7, 8, 9)</test_tuple>
<test_dict>
<k1>3</k1>
<k0>v</k0>
</test_dict>
<test_string>test string</test_string>
</document>
*question 1:*
so i assume, i need a dict {} to generate the xml, the question is why
there is <document> in the xml result? is it possible to have different at
the top?
*e.g.*
<?xml version="1.0" encoding="UTF-8" ?>
<SerioCommands version="1.0">
...
</SerioCommands>
*question 2:*
how to generate the CDATA in xml ?
*e.g.*
<![CDATA[
...
]]>
*question 3:*
why i can't create dict in dict to produce xml result like
<UiScreen>
<Title>Select Job</Title>
<LinkScreen>
<LinkControl>
<LinkItem href="./scan2ftp.xml">
<Label>Scan</Label>
</LinkItem>
<LinkItem href="./copy.xml">
<Label>Copy</Label>
</LinkItem>
</LinkControl>
</LinkScreen>
</UiScreen>
thanks and best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.