[web2py] Re: get variables in view from other controller

2011-03-20 Thread LightOfMooN
It's that I need, with using [0][0] Can you explain that are it means? Does web2py return html like set of helpers? is [0][0] the first container's content of returned set (first div's content)? On 20 мар, 10:32, Anthony abasta...@gmail.com wrote: On Saturday, March 19, 2011 5:18:23 PM UTC-4,

[web2py] Validators for webservices?

2011-03-20 Thread Marcel Luethi
Hi all I'm looking for a way to validate the record data I receive from a webservice. Because there is no form associated it seems that I cannot use SQLFORM and form.accepts(). Is there any other way to use the already defined validators to do the check? I'm searching for something like

[web2py] Re: Multiple forms grouped as one (django formset equivalent) with jquery plugin allowing clients to add and remove forms on the client-side

2011-03-20 Thread ChrisT
Thank you everyone for your help and suggestions. I realize Massimo must have like a million other things in his head right know and I don't hold it against him for not coming up with a recipe for this. :-) Again thank you Massimo for all the hard work you have put in to this great framework. As I

[web2py] passing value to xml

2011-03-20 Thread b0j3
Hi! I'm using service.xml to return value and the call is: http://server.com/service.xml I'd like to pass a key value, so I can distinguish users. Is there a way to pass a key value? Any suggestions? I thought to just add a html view and pass the key through that and then use session to see if

Re: [web2py] Re: Best way to return all users who have a specific role?

2011-03-20 Thread Tom Atkins
Thanks for the replies. All is working OK now. Not sure what was happening yesterday. I think I was just having one of those days... In case anyone else comes across this thread - the advice below is good: use a normal shell and make sure to do a db.commit() On 19 March 2011 14:25,

[web2py] AttributeError: 'Recaptcha' object has no attribute 'options'

2011-03-20 Thread Ed Greenberg
Following the book, I do this in db.py, after auth has been instantiated. from gluon.tools import Recaptcha auth.settings.captcha = Recaptcha(request,'6LczqcISA...cAoH','6L...L2') and I get a ticket: AttributeError: 'Recaptcha' object has no attribute 'options' Any ideas? Traceback below. Ed

Re: [web2py] Re: Where is the Shell ????

2011-03-20 Thread Ovidio Marinho
I think there was anything wrong with the version I downloaded for windows, downloaded the. src worked Thanks.{{ RESOLVED}} 2011/3/19 villas villa...@gmail.com Open a dos commandline window, navigate to the web2py directory, type: c:\web2py python web2py.py --help which shows all the

[web2py] hierarchical authorization

2011-03-20 Thread Martin Weissenboeck
Hi everybody, I have the following problem: I need some kind of hierarchical authorization. This is a simplified model: Company C001...C500 Departement D01...D15 Group G01...G40 Person P01...P30 Not every company has 15 departements, not every departement has 40 groups and so

[web2py] Toggle on

2011-03-20 Thread Ovidio Marinho
Need to expand the state's stay tuned to hide the entries, showing the table so if you need to insert records oh yes I would use the toggler. Status default ON h1List Companies/h1 [a href=#nil onclick=jQuery('#form').slideToggle();toggle/a] div id=form No default =

[web2py] Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-20 Thread Neodudeman
Hey guys, I'm stumped on this error that I'm getting. I recently upgraded from Web2py 1.79 to 1.93, and when viewing a certain, important, relatively complicated view file, I get this error. [The end tag is unmatched, please check if you have a starting block tag] And I can't, for the life of

[web2py] Re: Validators for webservices?

2011-03-20 Thread Massimo Di Pierro
This: @service.jsonrpc def update(record): errors = validate(db.mytable, record) if errors: return dict(success=False, msg=', '.join(errors)) else: db(db.mytable.id == record.id).update(record) return dict(success=True) should be @request.restful() def

[web2py] Re: Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-20 Thread Massimo Di Pierro
Do you have something like {{end}} in your view? The old template parse was more forgiving when it comes to invalid templates and did not support blocks. On Mar 20, 9:11 am, Neodudeman tams...@gmail.com wrote: Hey guys, I'm stumped on this error that I'm getting. I recently upgraded from

[web2py] Re: Backup/Restore problem with web2py, postgres

2011-03-20 Thread VP
What does this do exactly? Can you explain? I've seen fake_migrate a few times, but unsure what it does. Thanks. On Mar 20, 12:05 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: ask web2py to repair it auth.define_tables(fake_migrate=True) On Mar 19, 10:16 pm, VP

[web2py] Re: Validators for webservices?

2011-03-20 Thread Kevin Ivarsen
Massimo's method may be better -- I haven't personally experimented with the restful stuff yet. But you can still use SQLFORM or SQLFORM.factory with form.accepts() to run the validators. You just don't display the form anywhere if you don't need to. You also need to pass formname=None to

Re: [web2py] Re: Backup/Restore problem with web2py, postgres

2011-03-20 Thread Marin Pranjic
It will create *.table files in your apps /database/ folder, but will not try to create those tables in database. In other words, it will fake creation of tables in db. I think :) Someone should confirm On Sun, Mar 20, 2011 at 3:40 PM, VP vtp2...@gmail.com wrote: What does this do exactly?

[web2py] web2py Issues

2011-03-20 Thread Neveen Adel
Hello, Issue#1: I want make server validation, but when return the page again i want to be had the entered values: e.x: if request.vars[str(item.id)] == NO and request.vars[comment+str(item.id)] == : session.flash = Invalid Value

[web2py] Re: web2py Issues

2011-03-20 Thread Kevin Ivarsen
Hi Neveen, Without a bit more context I'm having trouble determining the problem. In principle you should be able to pass vars=request.vars to URL and have them show up in the redirected URL. For example: def func1(): if request.vars.value == hello: return you submitted hello

[web2py] web2py pycon 2011 tutorial video - second part

2011-03-20 Thread agend
hi, does anybody know where can i find second part of this video : http://blip.tv/file/4879126 tia Arek

[web2py] Changelog version number 1.64.4 - 1.94.4

2011-03-20 Thread Kevin Ivarsen
Hi Massimo, The latest changelog entry shows 1.64.4 rather than 1.94.4. The same thing happened with 1.93... have you checked to see if your keyboard is upside-down? :-) Also, should there be a 1.94.5? Cheers, Kevin

[web2py] Re: web2py pycon 2011 tutorial video - second part

2011-03-20 Thread Kevin Ivarsen
As I understand it, there was an error and the second part unfortunately did not get recorded. Cheers, Kevin

[web2py] Re: web2py pycon 2011 tutorial video - second part

2011-03-20 Thread DenesL
Kevin is right, see http://groups.google.com/group/web2py/msg/b8da12857b5aa014?hl=en On Mar 20, 12:12 pm, Kevin Ivarsen kivar...@gmail.com wrote: As I understand it, there was an error and the second part unfortunately did not get recorded. Cheers, Kevin

[web2py] Re: web2py pycon 2011 tutorial video - second part

2011-03-20 Thread agend
ok, thanks On Mar 20, 5:14 pm, DenesL denes1...@yahoo.ca wrote: Kevin is right, seehttp://groups.google.com/group/web2py/msg/b8da12857b5aa014?hl=en On Mar 20, 12:12 pm, Kevin Ivarsen kivar...@gmail.com wrote: As I understand it, there was an error and the second part unfortunately

[web2py] Converting legacy MySQL databases to web2py DAL

2011-03-20 Thread Kevin Ivarsen
Hi folks, Today I made some enhancements to the web2py/scripts/extract_mysql_models.py script that converts existing MySQL tables into a DAL representation. I've attached a copy for anyone that might find it useful. The major changes are as follows: - I got rid of the dependencies on the

[web2py] Re: Changelog version number 1.64.4 - 1.94.4

2011-03-20 Thread Massimo Di Pierro
I think I am upside down. Will fix it. On Mar 20, 11:12 am, Kevin Ivarsen kivar...@gmail.com wrote: Hi Massimo, The latest changelog entry shows 1.64.4 rather than 1.94.4.  The same thing happened with 1.93... have you checked to see if your keyboard is upside-down? :-) Also, should there

[web2py] Re: AttributeError: 'Recaptcha' object has no attribute 'options'

2011-03-20 Thread DenesL
There was a missing source line in 1.91.6 (and maybe others around the time). If you are running from source you can fix it by adding: self.options = options to the __init__ part of the Recaptcha class. Or upgrade to a newer version. On Mar 20, 7:44 am, Ed Greenberg greenberg...@gmail.com

[web2py] Re: web2py Issues

2011-03-20 Thread DenesL
On Mar 20, 11:32 am, Neveen Adel nevo.a...@gmail.com wrote: Hello,  Issue#1:   I want make server validation, but when return the page again i want to be had the entered values:   e.x:    if request.vars[str(item.id)] == NO and request.vars[comment+str(item.id)] == :                    

[web2py] layouts and =include

2011-03-20 Thread kyussa
Hi, I've just started to learning Web2py and I've found something strange for me. Could you please let me know if its me doing something wrong or its a Web2py limitation? I have some view (lets say: index.html) extending layout.html. But in layout.html I use include 'layout_body.html'. Now

[web2py] Re: layouts and =include

2011-03-20 Thread Kevin Ivarsen
Hi kyrussa, Try the following: layout.html: Begin main layout {{include}} End main layout layout_body.html: {{extend layout.html}} Begin layout body {{include}} End layout body mypage.html {{extend layout_body.html}} This is my content When you render mypage, you should get:

[web2py] Alternative for annoying default javascript integer/double/decimal validtors

2011-03-20 Thread Kevin Ivarsen
Hi all, I find the default javascript validators for integer, double, and decimal SQLFORM fields to be a little annoying. Consider the following surprising behaviors: - You can't navigate within the textbox using the keyboard. Pressing left, right, home, or end all result in the cursor

[web2py] Re: passing value to xml

2011-03-20 Thread DenesL
http://server.com/service.xml/x http://server.com/service.xml?key=x On Mar 20, 6:03 am, b0j3 boje...@gmail.com wrote: Hi! I'm using service.xml to return value and the call is: http://server.com/service.xml I'd like to pass a key value, so I can distinguish users. Is there a way to

[web2py] Re: layouts and =include

2011-03-20 Thread Kevin Ivarsen
For another alternative which I think is more flexible, look at the {{block}} syntax. This lets you define multiple sections that can be overridden by an extending template. Example (untested): -- layout.html title{{block title}}My default title{{end}}/title script {{block scripts}} {{end}}

[web2py] Re: passing value to xml

2011-03-20 Thread Kevin Ivarsen
To expand on DenesL's reply, from your controller you would access these values in the following ways: For http://example.com/app/controller/service.xml/somevalue you would use: request.args(0) # returns somevalue, or None if nothing is provided For

[web2py] Re: passing value to xml

2011-03-20 Thread b0j3
Thanks, guys. That helped. I also found out (not reading the manual - manly I am), that putting @service.xml before the definition in controller means the xml return is somewhat mandatory, but you have to use xml in your URL e.g.: http://example.com/example/default/call/xml/controller/pass_value

[web2py] XML manipulation

2011-03-20 Thread villas
Hi All, I would like to extract XML from a table and then manipulate it. The process being something like this in horrible pseudo-code: my table fields = id:1, name:Alan, price:5 xmldata = table.xml transform xmldata, e.g. xmldata.replace_element_name('name', 'newname')

[web2py] Re: layouts and =include

2011-03-20 Thread kyussa
Yes, thats what I am playing with now. Thanks :) Regards Adam

[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: Validators for webservices?

2011-03-20 Thread Marcel Luethi
Hi Massimo After upgrading to 1.94.5 it works perfectly. Thank you very much! Is there anywhere some documentation regarding request.restful() besides your video and the thread here on Google groups? Great stuff! Regards, Marcel On 20 Mrz., 15:20, Massimo Di Pierro

[web2py] Re: Validators for webservices?

2011-03-20 Thread Marcel Luethi
Hi Kevin Thanks for your input! This is a valuable solution. But I would still need to add all my already existing validators to SQLFORM.factory. Wouldn't I? Therefore I tried Massimo's solution first. Best regards, Marcel On 20 Mrz., 15:43, Kevin Ivarsen kivar...@gmail.com wrote:

[web2py] setup.py to install web2py globally into the python env/virtualenv

2011-03-20 Thread Praneeth Bodduluri
Hello all, In an attempt to make web2py pip installable, so that I can use gluon as a module in other python programs, I created a setup.py that can be used to create a source dist for PyPI. Attached are the files that need to be placed in the web2py root directory. To create the source

[web2py] Re: How to build windows binary yourself?

2011-03-20 Thread Brian M
OK, I've got a version that appears to build successfully - had to re-write the code to gather the list of data_files - reglob() didn't return files in expected format. It's working but currently is including a bunch of windows API files in the dist directory, so it would NOT be appropriate

[web2py] Re: get variables in view from other controller

2011-03-20 Thread Anthony
On Sunday, March 20, 2011 3:05:04 AM UTC-4, LightOfMooN wrote: It's that I need, with using [0][0] Can you explain that are it means? Does web2py return html like set of helpers? is [0][0] the first container's content of returned set (first div's content)? It looks like LOAD returns

Re: [web2py] Re: How to build windows binary yourself?

2011-03-20 Thread Praneeth Bodduluri
We have used http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/view/head:/static/scripts/tools/standalone_exe.py To build custom exes of web2py with certain modules added in. The above works with py2exe. Recently I have been using cxfreeze with my other projects - It appears to be way more

[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

Re: [web2py] Re: How to build windows binary yourself?

2011-03-20 Thread Brian M
Thanks Praneeth, looks like what your script builds what I've got going produce pretty much the same output (once I comment out the few extra modules you've got that I don't). 1) I notice you're using shutil to just copy the applications directory rather than passing the correct tuples to

[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,

[web2py] Re: Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-20 Thread Neodudeman
I searched my entire file for anything with the word 'end' Closest things were {{end = len(list)}} and !--End-- both of which I've changed, and I've still got the error. On Mar 20, 10:22 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Do you have something like {{end}} in your view?

[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 villa...@gmail.com 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

[web2py] Re: Stumped on error: The end tag is unmatched, please check if you have a starting block tag

2011-03-20 Thread Massimo Di Pierro
I think this is creating the problem: {{end = len(list)}} This is to be considered in a bug in the template parser. I think I have fixed it in trunk (please check it). Meanwhile if you choose to stable, you can remove the spaces {{end=len(list)}} and the problem should go away. Massimo On Mar

Re: [web2py] setup.py to install web2py globally into the python env/virtualenv

2011-03-20 Thread Jason (spot) Brower
This is a great thing to put web2py to a new level of quality. Thanks! On 20 Mar 2011 23:34, Praneeth Bodduluri life...@gmail.com wrote: Hello all, In an attempt to make web2py pip installable, so that I can use gluon as a module in other python programs, I created a setup.py that can be

[web2py] Re: setup.py to install web2py globally into the python env/virtualenv

2011-03-20 Thread Massimo Di Pierro
This is great! Monday and Tuesday are busy days for me but I will check this asap. Please open a web2py issue on google code to make sure this is tracked. Massimo On Mar 20, 4:34 pm, Praneeth Bodduluri life...@gmail.com wrote: Hello all, In an attempt to make web2py pip installable, so that I

[web2py] Re: hierarchical authorization

2011-03-20 Thread Joe Barnhart
Isn't this a perfect example of a place to use web2py with LDAP? -- Joe On Mar 20, 5:22 am, Martin Weissenboeck mweis...@gmail.com wrote: Hi everybody, I have the following problem: I need some kind of hierarchical authorization. This is a simplified model: Company C001...C500    

Re: [web2py] Re: hierarchical authorization

2011-03-20 Thread Martin Weissenboeck
Thank you for this hint. I do not have any experience with LDAP but of course it would be an interesting callenge to learn more. 2011/3/21 Joe Barnhart joe.barnh...@gmail.com Isn't this a perfect example of a place to use web2py with LDAP? -- Joe On Mar 20, 5:22 am, Martin Weissenboeck