Re: [web2py] Re: Xml use in python 3.6

2019-02-24 Thread Massimo Di Pierro
Very strange. Will check asap. On Sunday, 24 February 2019 16:57:07 UTC-8, Lovedie JC wrote: > > I tried with the new updated web2py 2.18 but still get the same issue. > Any help as to how to use xml here (also with yatl)? > Regards > > On Thu, 21 Feb 2019 at 10:55, Massimo Di Pierro < > massimo.d

Re: [web2py] Re: Xml use in python 3.6

2019-02-24 Thread Lovedie JC
I tried with the new updated web2py 2.18 but still get the same issue. Any help as to how to use xml here (also with yatl)? Regards On Thu, 21 Feb 2019 at 10:55, Massimo Di Pierro wrote: > The issue is fixed in https://github.com/web2py/yatl and it will go away > in web2py as soon as we switch >

[web2py] Re: Xml use in python 3.6

2019-02-20 Thread Massimo Di Pierro
The issue is fixed in https://github.com/web2py/yatl and it will go away in web2py as soon as we switch On Monday, 18 February 2019 18:54:38 UTC-8, Maurice Waka wrote: > > Hallo. > I created this issue in github but no response so far. > "xml() in python 3.6 · Issue #2096 · web2py/web2py" > ht

[web2py] Re: xml() error when BEAUTIFY globals()

2017-03-24 Thread Lars
I went for something even simpler : I bypass BEAUTIFUL.. I just wanted a view with everything named : def my_beautify(component): t = TABLE() if isinstance(component, dict): for k, v in component.iteritems(): if v is None or isinstance(v, (bool, str)):

Re: [web2py] Re: xml() error when BEAUTIFY globals()

2017-03-24 Thread Richard Vézina
Thanks Anthony, clearer than my explanation. Richard On Thu, Mar 23, 2017 at 7:08 PM, Anthony wrote: > BEAUTIFY is not designed to take the entire global environment. The > problem is that globals() includes all of the web2py HTML helper classes. > Because BEAUTIFY is itself an HTML helper, it

[web2py] Re: xml() error when BEAUTIFY globals()

2017-03-23 Thread Anthony
BEAUTIFY is not designed to take the entire global environment. The problem is that globals() includes all of the web2py HTML helper classes. Because BEAUTIFY is itself an HTML helper, it is serialized by recursively processing its components. The serialization process checks whether a given co

[web2py] Re: XML(sanitize=True) and incorrect HTML

2016-06-18 Thread Massimo Di Pierro
thanks for reporting this. On Wednesday, 15 June 2016 02:29:53 UTC-5, Kirill Shatalaev wrote: > > Opened #1363 > > вторник, 14 июня 2016 г., 22:25:05 UTC+4 пользователь Anthony написал: >> >> >> Feel free to file a Github issue. >> >> Anthony >> >> -- Resources: - http://web2py.com - http://web2

[web2py] Re: XML(sanitize=True) and incorrect HTML

2016-06-15 Thread Kirill Shatalaev
Opened #1363 вторник, 14 июня 2016 г., 22:25:05 UTC+4 пользователь Anthony написал: > > > Feel free to file a Github issue. > > Anthony > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: XML(sanitize=True) and incorrect HTML

2016-06-14 Thread Anthony
In gluon.sanitizer.XssCleaner: def handle_endtag(self, tag): bracketed = '' % tag self.in_disallowed.pop() if tag not in self.permitted_tags: if (not self.strip_disallowed): self.result += xssescape(bracketed) elif tag in self.open_ta

Re: [web2py] Re: XML object

2016-03-19 Thread Jerry Liu
Yes, I am using it on html page. It doesn't work when html contains iframe tag. iframe tag will still be escaped. so I tried override, still not working. On Wed, Mar 16, 2016 at 12:21 PM, Anthony wrote: > Are you inserting it in the view somehow: > > {{=XML(...)}} > > If so, what are you seeing

Re: [web2py] Re: XML object

2016-03-19 Thread Anthony
Please show your exact view code as well as the final rendered HTML. -- 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

[web2py] Re: XML object

2016-03-19 Thread Anthony
Are you inserting it in the view somehow: {{=XML(...)}} If so, what are you seeing in the final rendered HTML? Anthony On Wednesday, March 16, 2016 at 3:12:04 PM UTC-4, Jerry Liu wrote: > > > Hi, all > > I want to use XML object to stop html from being escaped. But the object > seems > not w

[web2py] Re: XML pickle/unpickle

2015-09-17 Thread Maxim
I did yesterday, issue #1067. I think the solution may be to replace: 671 return marshal.loads(data) with 671 return XML(marshal.loads(data)) On Thursday, September 17, 2015 at 9:11:58 PM UTC+3, Massimo Di Pierro wrote: > > Weird. Can you open a ticket and I will test it asap? > > O

[web2py] Re: XML pickle/unpickle

2015-09-17 Thread Massimo Di Pierro
Weird. Can you open a ticket and I will test it asap? On Wednesday, 16 September 2015 13:31:40 UTC-5, Maxim wrote: > > > Why do you want comment it out anyway? >> > > This: > >> The reason is that is allows storing variables that contain XML('.') >> in sessions. That is useful to deal with f

[web2py] Re: XML pickle/unpickle

2015-09-16 Thread Maxim Hrustalev
> Why do you want comment it out anyway? > This: > The reason is that is allows storing variables that contain XML('.') > in sessions. That is useful to deal with flash messages that contain more > than just text. I want to store XML in session flash message, like Massimo stated, but

[web2py] Re: XML pickle/unpickle

2015-09-16 Thread Leonel Câmara
Why do you want comment it out anyway? -- 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

[web2py] Re: XML pickle/unpickle

2015-09-16 Thread Massimo Di Pierro
The reason is that is allows storing variables that contain XML('.') in sessions. That is useful to deal with flash messages that contain more than just text. On Wednesday, 16 September 2015 08:42:55 UTC-5, Maxim Hrustalev wrote: > > Does anyone with deep knowledge of web2py know why this co

[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-29 Thread jackson . read
I followed the link given and used lxml package instead of xml and it works. lxml does not add the prefixes that xmk does. The lxml API is a superset of the xml API so I did not have to change the code much. BTW I tried removing the ns0 prefix in the svg as per the suggestion the svg displays

[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-29 Thread Anthony
The problem is not with the XML helper but with the way you are generating the SVG markup (you must do it without the "ns0" namespace). For tips on how to do it correctly, see http://stackoverflow.com/questions/3895951/create-svg-xml-document-without-ns0-namespace-using-python-elementtree. Alte

[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-28 Thread Anthony
Are you returning just the SVG to the browser, or are you embedding the SVG in an HTML page? If the latter, just return the SVG string directly without wrapping in XML() -- the XML helper is only needed to prevent escaping in an HTML view. Note, in this case, you will need to set the Content-Typ

[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-28 Thread Massimo Di Pierro
Can you show us the code that mangles it? This should not do it. Something is wrong. On Tuesday, 28 July 2015 15:52:57 UTC-5, jackson.r...@quantachrome.com wrote: > > IN a controller if I return an svg that has full namspace prefixes > (default for the python xml package 'tostring' method )via

[web2py] Re: xml view

2015-05-20 Thread Mirek Zvolský
My experiments and previous comment (to LoveWeb2py) were slow and late. Thank you Massimo for exact answer. So it is very similar to normal views. I just was confused with the content of views/generic.xml which seems has problems with escaping for more complicated rendered data. Dne středa

[web2py] Re: xml view

2015-05-20 Thread Mirek Zvolský
Thank you. That works. And I have found that I can have more control over the tag structure so: {{for invoice in invoices:}} {{=invoice.amount}} {{pass}} It looks so that there aren't problems with escaping as I have described in the original question. Dne pondělí 18. k

[web2py] Re: xml view

2015-05-20 Thread Massimo Di Pierro
You would do this, for example # in model db.define_table('person',Field('name')) # controller def mydata(): rows = db(db.person).select() return dict(rows=rows) # create a view default/mydata.xml {{for row in rows:}}{{=row.name}}{{pass}} the call http:///mydata.xml You can als

[web2py] Re: xml view

2015-05-18 Thread LoveWeb2py
This should work: controller: data = db(db.table.id>0).select() return dict(data=data) view: {{=data.xml()}} On Monday, May 18, 2015 at 1:52:31 PM UTC-4, Mirek Zvolský wrote: > > I don't know how to write xml views. > > Basic content: {{from gluon.serializers import > xml}}{{=XML(xml(response.

[web2py] Re: {{=XML(row.contents, sanitize=True)}} and

2014-07-03 Thread Annet
Hi Cliff, Thanks for your reply. I put the permitted-tags and allowed-attributes parameter into a module and added the tags and attributes I needed to the lists. Problem solved. Regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2p

[web2py] Re: {{=XML(row.contents, sanitize=True)}} and

2014-07-02 Thread Cliff Kachinske
You can tune the tags and attributes that XML will allow. XML has a parameter called "permitted_tags." It is a list of tags that XML will not escape. You could, at the top of your controller, create your own list of permitted tags. Then call XML like this: XML(row.contents, sanitize=True, pe

Re: [web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-13 Thread Manuele Pesenti
Il 12/06/14 23:26, LoveWeb2py ha scritto: > So I currently have it like this: > > function init(){ > var json = '{{=XML(json_data_from_controller)}}'; what about to use this code instead? function init() { window.json = {{=XML(json_data_from_controller)}}; }; and then you can find your v

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread LoveWeb2py
Sigh it was the apostrophes around the XML statement. Sorry about that guys I didn't realize I didn't need the ' enclosures... On Thursday, June 12, 2014 10:11:58 AM UTC-4, LoveWeb2py wrote: > > Hello, > > I'm trying to pass a variable which has json data into infovis for a > visualization

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread LoveWeb2py
if I type {{=XML(json_data_from_controller)}} outside of the var I can see the json data. Also, if I copy and paste the json data right into the variable that also works. On Thursday, June 12, 2014 5:26:21 PM UTC-4, LoveWeb2py wrote: > > So I currently have it like this: > > function init(){ >

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread LoveWeb2py
So I currently have it like this: function init(){ var json = '{{=XML(json_data_from_controller)}}'; but I'm still getting undefined On Thursday, June 12, 2014 2:42:31 PM UTC-4, Andrew W wrote: > > Yes. Add a

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread Andrew W
Yes. Add a

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread LoveWeb2py
so would it be better if I just paste the code into the view? Would it make it easier? On Thursday, June 12, 2014 12:53:10 PM UTC-4, Leonel Câmara wrote: > > .js files are static files so they don't go trough the view templating > process. See the welcome application web2py_ajax.html file for an

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread Leonel Câmara
.js files are static files so they don't go trough the view templating process. See the welcome application web2py_ajax.html file for an example of how to setup variables for javascript. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: {{=XML(data)}} for javascript variable issue

2014-06-12 Thread LoveWeb2py
Just an update this is where I'm trying to place the variable: var json = '{{=XML(data_returned_from_controller)}}'; On Thursday, June 12, 2014 10:11:58 AM UTC-4, LoveWeb2py wrote: > > Hello, > > I'm trying to pass a variable which has json data into infovis for a > visualization > > It's interes

Re: [web2py] Re: XML, sanitize

2013-02-05 Thread Martijn Hermans
Thanks once again :) I really appreciate your quick response to these questions. A happy web2py user. 2013/2/4 Massimo Di Pierro > You will be fine. SPAN should be there by default. It is not and that is > an oversight. FONT is not there because deprecated tag. > > > On Monday, 4 February

[web2py] Re: XML, sanitize

2013-02-04 Thread Massimo Di Pierro
You will be fine. SPAN should be there by default. It is not and that is an oversight. FONT is not there because deprecated tag. On Monday, 4 February 2013 12:06:42 UTC-6, Martijn Hermans wrote: > > I've got a website in wich I want to allow the user some customization. > > To prevent my site fro

[web2py] Re: XML response

2012-12-14 Thread Charis
response.view worked perfectly. Thank you for your response. On Thursday, 13 December 2012 19:59:41 UTC, Niphlod wrote: > > you can set it BEFORE returning anything with response.view (e.g. for a > function needing views/randomfolder/index.xml it would be response.view = > 'randomfolder/index

[web2py] Re: XML response

2012-12-13 Thread Niphlod
you can set it BEFORE returning anything with response.view (e.g. for a function needing views/randomfolder/index.xml it would be response.view = 'randomfolder/index.xml') On Thursday, December 13, 2012 5:39:54 PM UTC+1, Charis wrote: > > I have managed to setup an xml response through index.xml

[web2py] Re: XML response

2012-12-13 Thread Charis
I have managed to setup an xml response through index.xml. How do I set the default view for only the particular controller to be the index.xml file instead of the index.html? Thank you, Charis On Thursday, 13 December 2012 15:22:47 UTC, Niphlod wrote: > > Plenty of ways: > - you code a c

[web2py] Re: XML response

2012-12-13 Thread Niphlod
Plenty of ways: - you code a controller/function.xml template in the views folder - you leverage the generic.xml view just ending your address in .xml - you return the xml directly from the controller (return something instead of return dict(something=something)) The point is mainly "what k

[web2py] Re: xml generated by web2py restful api

2012-03-20 Thread castanets
Massimo Di Pierro writes: > > > Can you show us your code?On Tuesday, 20 March 2012 05:26:47 UTC-5, castanets > wrote: > restful api generated xml like as below :1 is there any method that the result is changed like this? : 1 > Thanks. > > > > > > > ★.co

[web2py] Re: xml generated by web2py restful api

2012-03-20 Thread Massimo Di Pierro
Can you show us your code? On Tuesday, 20 March 2012 05:26:47 UTC-5, castanets wrote: > > restful api generated xml like as below : > > 1 > > > is there any method that the result is changed like this? : > encoding="UTF-8"?>1 > > > Thanks. > >

[web2py] Re: xml-rpc code causes compile error in mywiki default.py

2012-02-09 Thread bill.tha...@live.com
Thanks Ross. Found that this morning. It's a typo in the book. For future readers finding this post on a search; Make sure you put the closing paren in the correct spot or your new error is a bit more substantial. (Python shell returns an error saying, 'Query' object has no attribute 'select' )

[web2py] Re: xml-rpc code causes compile error in mywiki default.py

2012-02-09 Thread Ross Peoples
You have a syntax error in fony_by(keyword): return db(db.page.title.contains(keyword).select().as_list() Should be: return db(db.page.title.contains(keyword)).select().as_list() You forgot the closing parenthesis before .select().

[web2py] Re: xml view of dict() with attributes

2011-10-26 Thread villas
@Kmax, nice solution!

Re: [web2py] Re: xml view of dict() with attributes

2011-10-25 Thread Richard Vézina
You right after sent my mail I told myself I should precise my suggestion :) Richard On Tue, Oct 25, 2011 at 10:31 AM, KMax wrote: > I am sure for complicated response lxml is the best. But for simple > response is TAG. > > On 24 окт, 23:16, Richard Vézina wrote: > > lxml is pretty nice lib f

[web2py] Re: xml view of dict() with attributes

2011-10-25 Thread KMax
I am sure for complicated response lxml is the best. But for simple response is TAG. On 24 окт, 23:16, Richard Vézina wrote: > lxml is pretty nice lib for the task... > > Richard > > On Mon, Oct 24, 2011 at 11:57 AM, KMax wrote: > > my solution: > > > def myxml(): > >    .. > >    return

Re: [web2py] Re: xml view of dict() with attributes

2011-10-24 Thread Richard Vézina
lxml is pretty nice lib for the task... Richard On Mon, Oct 24, 2011 at 11:57 AM, KMax wrote: > my solution: > > def myxml(): >.. >return '' + > str(TAG.response(TAG.result('0'), >*[TAG[parameter](request.get_vars[parameter]) > for parameter in request.ge

[web2py] Re: xml view of dict() with attributes

2011-10-24 Thread KMax
my solution: def myxml(): .. return '' + str(TAG.response(TAG.result('0'), *[TAG[parameter](request.get_vars[parameter]) for parameter in request.get_vars])) So, anyone could customize it on their needs. Thanks Massimo. On 24 окт, 21:15, Massimo Di Pierro

[web2py] Re: xml view of dict() with attributes

2011-10-24 Thread Massimo Di Pierro
Yes. You need to implement your own XML serializer. You can use helpers too for this purpose. It really depends on how your output should look like. On Oct 23, 11:07 pm, KMax wrote: > So, with return dict() and generic.xml view is impossible to produce > attribute in a xml tag? > Just to stop loo

[web2py] Re: xml view of dict() with attributes

2011-10-23 Thread KMax
So, with return dict() and generic.xml view is impossible to produce attribute in a xml tag? Just to stop looking in this way for solution. Thanks Massimo. On 23 окт, 22:53, Massimo Di Pierro wrote: > You can make a myxml.html view that contains: > > > >    {{=itemtitle}} >    {{=itemvalue}} >

[web2py] Re: xml view of dict() with attributes

2011-10-23 Thread Massimo Di Pierro
You can make a myxml.html view that contains: {{=itemtitle}} {{=itemvalue}} On Oct 23, 5:09 am, KMax wrote: > Hello, >   Please help with exporting some dict to .xml view with attributes > inside tags. > > Like: > > > >    Title >    Value > > > I am talking about "hello='world'" in

[web2py] Re: xml in response not well formed

2011-09-25 Thread Martin
I tested with Chrome and I don't have the issue... so, it seems to be that it's in the Firefox side... this is really weird... Thank you very much for your help Jonathan, I will include a restriction to open the application just with Chrome... Much appreciated! Martin

Re: [web2py] Re: xml in response not well formed

2011-09-25 Thread Jonathan Lundell
On Sep 25, 2011, at 4:32 PM, Martin wrote: > Response Headers > X-Powered-By web2py > Set-Cookiesession_id_nems_web=127.0.0.1-1c024dc8-7db7-440c-a45e- > d57de93d8879; Path=/ > Expires Sun, 25 Sep 2011 23:30:33 GMT > Pragmano-cache > Cache-Control no-store, no-cache, must-revalid

[web2py] Re: xml in response not well formed

2011-09-25 Thread Martin
Response Headers X-Powered-Byweb2py Set-Cookie session_id_nems_web=127.0.0.1-1c024dc8-7db7-440c-a45e- d57de93d8879; Path=/ Expires Sun, 25 Sep 2011 23:30:33 GMT Pragma no-cache Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre- check=0 Content-Typeapplication/xml

Re: [web2py] Re: xml in response not well formed

2011-09-25 Thread Jonathan Lundell
On Sep 25, 2011, at 3:52 PM, Martin wrote: > yes, you are right, because the variables for the following xml part > it suppose to be not available for current request, which corresponds > to operation == 'get_leafs'... Can you get a look at the Content-length header of the response? > > 1.0 >

[web2py] Re: xml in response not well formed

2011-09-25 Thread Martin
yes, you are right, because the variables for the following xml part it suppose to be not available for current request, which corresponds to operation == 'get_leafs'... 1.0 2 2 ns1:max-lease-time

[web2py] Re: xml in response not well formed

2011-09-25 Thread Martin
I appologize: the variables passed to the view are: operation = "leaf_modify" op_response = "True" Tincho

Re: [web2py] Re: XML-RPC Service Introspection / Discovery

2011-09-13 Thread Michele Comitini
+1 Cool! But we need to take the bad note too... >> However, you will notice that there is another method in there: >> system.methodSignature(). This would show the signature of the method (i.e. >> concat(str1, str2, str3=''), however, it seems that web2py's XMLRPC server >> implementation (or S

[web2py] Re: XML-RPC Service Introspection / Discovery

2011-09-12 Thread Massimo Di Pierro
Cool! This should go in the manual. On Sep 12, 10:47 am, Ross Peoples wrote: > One of the nice things about SOAP is the WDSL that gives you information > about the methods the service supports. I recently discovered that you can > do the same thing with XML-RPC. The trick is to document your meth

[web2py] Re: xml to string or json

2011-05-24 Thread DenesL
elementTree is an option, available in Python itself, depending on your version. On May 24, 7:03 pm, Resa wrote: > Specifically i have data that is in XML (grade) in my controller and i > wanted to parse it. eg grade.find(".").. however this would clearly > not work.. are there any suggestions a

Re: [web2py] Re: xml()

2011-04-15 Thread Stifan Kristi
a, i c, thank you so much for your explaination, massimo. i got it when i use web2py wizard on 1.94.6 version. best regards, steve van christie On Sat, Apr 16, 2011 at 9:12 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This was a bad idea and it does not work with recent web2py.

[web2py] Re: xml()

2011-04-15 Thread Massimo Di Pierro
This was a bad idea and it does not work with recent web2py. Should be URL('default','index')==URL() Is basically check whether /app/default/index is the current requested path. On Apr 15, 8:07 pm, 黄祥 wrote: > hi, > > pardon me, i want to ask what's the meaning of this : > URL('default','index

Re: [web2py] Re: XML manipulation

2011-03-21 Thread Richard Vézina
Yes to much idea to make them all! R On Mon, Mar 21, 2011 at 9:09 PM, villas wrote: > Hi Richard, > > In my case I was making the XML fit a specification given to me by > someone else. It isn't very flexible to change it, but I doubt that > the specification will be changing much either. > > I

Re: [web2py] Re: XML manipulation

2011-03-21 Thread Richard Vézina
That's a brillant idea... I check about it tomorrow. Thanks Richard On Mon, Mar 21, 2011 at 5:05 PM, mart wrote: > Hi Richard, > > Yeah, I hate transforms too :( I haven't really worked with wordml, > but... it all looks the same to me... I would definitely take the > dictionary approach, sho

[web2py] Re: XML manipulation

2011-03-21 Thread villas
Hi Richard, In my case I was making the XML fit a specification given to me by someone else. It isn't very flexible to change it, but I doubt that the specification will be changing much either. It is a pity there isn't a Zen of XML saying there should ideally be just one obvious way of doing so

[web2py] Re: XML manipulation

2011-03-21 Thread mart
Hi Richard, Yeah, I hate transforms too :( I haven't really worked with wordml, but... it all looks the same to me... I would definitely take the dictionary approach, should be fairly simple. If you like i can grap a web2py table, convert it to xml (that is how you are getting you xml?), then writ

Re: [web2py] Re: XML manipulation

2011-03-21 Thread Richard Vézina
It is not bad for start... But what happen when you change your query in term of number of columns or rows? Do you have to make an other template each time... Personnaly I don't like xml that much, so I don't want to have to get back at editing my template all the time. Richard On Mon, Mar 21, 20

[web2py] Re: XML manipulation

2011-03-21 Thread villas
Hi Richard As a novice, the easiest solution I found was something like this: * create wordml.xml template in views/default/ folder * prepare the xml, place variables for the data * create a wordml function in controller * manipulate your data into the variables in the controller ready to place i

Re: [web2py] Re: XML manipulation

2011-03-21 Thread Richard Vézina
Hello Mart, I need to generate WordML out of web2py... Is there a "easier" or more integrated way then use xslt transformation that is the easiest way that comes to my mind? Thanks Richard On Sun, Mar 20, 2011 at 8:20 PM, mart wrote: > I use lots of XML to drive automation, file system struct

[web2py] Re: XML manipulation

2011-03-20 Thread mart
Agreed, often best to wait, take a step back and eventually we trip and fall on our own answers ;) On Mar 20, 8:57 pm, villas wrote: > Thanks Mart, that's really kind!  To cut a long story short, I > eventually figured out that I don't need to manipulate any XML itself > at this stage, I can mani

[web2py] Re: XML manipulation

2011-03-20 Thread villas
Thanks Mart, that's really kind! To cut a long story short, I eventually figured out that I don't need to manipulate any XML itself at this stage, I can manipulate everything first and just render it at the end. I've wasted so much time messing around, so if it gets complicated for me again, I'l

[web2py] Re: XML manipulation

2011-03-20 Thread mart
I use lots of XML to drive automation, file system structure, validation, user initial input, etc, so pretty much everywhere I make use of xml. much of the data (that may be user or project specific) is submitted as XML, then use that to populate tables (which BTW - I found lately to be a great way

[web2py] Re: XML manipulation

2011-03-20 Thread villas
OK I found a way (it was of course easier than I thought!). However, if anyone has any interesting XML resources/tips, I would still be interested to learn more. Thanks!

[web2py] Re: XML() object in html.py breaks ajax callback which needs HTML returned.

2011-03-12 Thread dlypka
FYI:I found the solution. It is a *GOTCHA* issue when upgrading to 1.92.3 from 1.77.3 Now you have to use .xml() on the URL() that you send into the GAE API: upload_url = blobstore.create_upload_url(URL(r=request,c='default',f='upbm2gig_gaehandle r',args=None).xml()) # This works upload

[web2py] Re: XML service

2010-12-12 Thread DenesL
The arguments to select should be the fields, not their names: db(db.cargroup).select(db.cargroup.descr, db.cargroup.seats,orderby=db.cargroup.descr).as_list() On Dec 10, 1:53 pm, villas wrote: > If I make a function with named fields,  e.g. > > def cargroup(): >     carlist = > db(db.cargroup

Re: [web2py] Re: xml advise

2010-11-29 Thread Johann Spies
On 30 November 2010 09:30, mdipierro wrote: > Mind that web2py has built-in soap implementation > > web2py/gluon/contrib/pysimplesoap/ > > and you can create services with > > @service.soap(...) > def f(a,b): return a+b > > Mariano is the expert on this. > > Thanks. At this stage I am only inter

[web2py] Re: xml advise

2010-11-29 Thread mdipierro
Mind that web2py has built-in soap implementation web2py/gluon/contrib/pysimplesoap/ and you can create services with @service.soap(...) def f(a,b): return a+b Mariano is the expert on this. On Nov 30, 1:24 am, Johann Spies wrote: > I have been busy with web2py for about a year and I am learn

[web2py] Re: XML on GAE [Resolved]

2010-10-06 Thread Relsi Hur
Thank you very much Massimo, now this returns only the selected fields. =) On 6 out, 14:09, mdipierro wrote: > You cannot export binary data (from blob) in xml. The problem is that > GAE ignores your list of fields. Instead you can do > > #xml tags > def export_xml(rows,fields): >     users=[] >

[web2py] Re: XML on GAE

2010-10-06 Thread mdipierro
You cannot export binary data (from blob) in xml. The problem is that GAE ignores your list of fields. Instead you can do #xml tags def export_xml(rows,fields): users=[] for row in rows: users.append(TAG.user(*[TAG[f](row[f]) for f in fields])) return TAG.users(*users).xml() #xml view

[web2py] Re: XML on GAE

2010-10-06 Thread Relsi Hur
well, in this way: db(db.auth_user.id>0).select(db.auth_user.bio, db.auth_user.lat, db.auth_user.lgt, db.auth_user.first_name, db.auth_user.country) Returns all fields of database, and not my selected, look: 46005 Relsi Hur Maron patosav...@gmail.com

[web2py] Re: XML on GAE

2010-10-06 Thread mdipierro
I do not understand. On Oct 6, 9:37 am, Relsi Hur wrote: > Thank you very much Massimo, > > Now returns alls fiels of model, but not complete structure, have > error in image element: > > here: \u\ufffd\ufffd\ufffd > > is not closing the tag, if have a image in db. > > On 6 out, 10:42, mdipie

[web2py] Re: XML on GAE

2010-10-06 Thread Relsi Hur
Thank you very much Massimo, Now returns alls fiels of model, but not complete structure, have error in image element: here: \u\ufffd\ufffd\ufffd is not closing the tag, if have a image in db. On 6 out, 10:42, mdipierro wrote: > Try replace > > db().select(db.auth_user.bio, db.auth_user.

[web2py] Re: XML on GAE

2010-10-06 Thread mdipierro
Try replace db().select(db.auth_user.bio, db.auth_user.lat, db.auth_user.lgt, db.auth_user.first_name, db.auth_user.country) with db(db.auth_user.id>0).select(db.auth_user.bio, db.auth_user.lat, db.auth_user.lgt, db.auth_user.first_name, db.auth_user.country) On Oct 6, 2:23 am, Relsi Hur wrote

[web2py] Re: XML+URL continuing problem

2010-08-20 Thread mdipierro
This was discussed in a separate thread: 1) we changed in order to fix a bug 2) we found that broke backward compatibility and reverted the change 3) we changed again together with other parts of web2py in order to make sure that it does not break backward compatibility People should test it and

[web2py] Re: XML sanitizer question

2010-07-22 Thread mdipierro
I agree. On Jul 23, 12:34 am, Jonathan Lundell wrote: > On Jul 22, 2010, at 10:07 PM, mr.freeze wrote: > > > That works. Thanks. > > I think perhaps sanitizer could use some work. A bare is harmless enough. > And ought to be OK. > > > > > On Jul 22, 11:23 pm, Jonathan Lundell wrote: > >> On J

Re: [web2py] Re: XML sanitizer question

2010-07-22 Thread Jonathan Lundell
On Jul 22, 2010, at 10:07 PM, mr.freeze wrote: > That works. Thanks. I think perhaps sanitizer could use some work. A bare is harmless enough. And ought to be OK. > > On Jul 22, 11:23 pm, Jonathan Lundell wrote: >> On Jul 22, 2010, at 7:41 PM, mr.freeze wrote: >> >>> Negative, it sanitizes

[web2py] Re: XML sanitizer question

2010-07-22 Thread mr.freeze
That works. Thanks. On Jul 22, 11:23 pm, Jonathan Lundell wrote: > On Jul 22, 2010, at 7:41 PM, mr.freeze wrote: > > > Negative, it sanitizes those too: > XML('test',sanitize=True,permitted_tags = > ['a']).xml() > > 'test' > > Only absolute URLs are acceptable. Tryhttp://web2py.com. >

Re: [web2py] Re: XML sanitizer question

2010-07-22 Thread Jonathan Lundell
On Jul 22, 2010, at 7:41 PM, mr.freeze wrote: > Negative, it sanitizes those too: XML('test',sanitize=True,permitted_tags = ['a']).xml() > 'test' Only absolute URLs are acceptable. Try http://web2py.com. > > On Jul 22, 9:38 pm, Jonathan Lundell wrote: >> On Jul 22, 2010, at 7:04 PM,

[web2py] Re: XML sanitizer question

2010-07-22 Thread mr.freeze
Negative, it sanitizes those too: >>> XML('test',sanitize=True,permitted_tags = >>> ['a']).xml() 'test' On Jul 22, 9:38 pm, Jonathan Lundell wrote: > On Jul 22, 2010, at 7:04 PM, mr.freeze wrote: > > XML('test',sanitize=True,permitted_tags = ['b']).xml() > > 'test' > XML('test',sanitiz

[web2py] Re: XML with custom TAG

2010-04-05 Thread Jason Lotz
Brilliant, Thanks!! Jay On Apr 5, 10:56 pm, DenesL wrote: > On Apr 5, 9:14 am, Jason Lotz wrote: > > > I'm trying to pass an XML string with custom TAG to a view, but I'm > > having trouble with syntax. > > > Required XML Syntax: > > > >         > >             cell content > >             c

[web2py] Re: XML with custom TAG

2010-04-05 Thread DenesL
On Apr 5, 9:14 am, Jason Lotz wrote: > I'm trying to pass an XML string with custom TAG to a view, but I'm > having trouble with syntax. > > Required XML Syntax: > > > cell content > cell content > > > > The code string in the controller: > rowxml=TAG.

[web2py:/] Re: xml (important)

2009-07-06 Thread pk
it still doesn`t work. here the routes.py #begin routes_in=(('/2busy/default/table_as_xml/$projectmember\.html','/myapp/ default/table_as_xml\.xml/$projectmember'),) routes_out=(('/2busy/default/table_as_xml\.html/$projectmember','/ myapp/default/table_as_xml/$projectmember\.html'),) #end htt

[web2py:/] Re: xml (important)

2009-07-06 Thread pk
it still doesn`t work On 6 Jul., 19:59, mdipierro wrote: > one more try > #begin > routes_in=(('/myapp/default/table_as_xml/$user\.html','/myapp/default/ > table_as_xml\.xml/$user'),) > routes_out=(('/myapp/default/table_as_xml\.html/$user','/myapp/default/ > table_as_xml/$user\.html'),) > #end