[web2py] Re: concurrency problem

2010-04-05 Thread Iceberg
Good to hear that is on your todo list, Massimo. When you do that, please also figure out a way to chain multi onvalidate functions, because I expect the crud.unmodified() would be used quite popular, if not everytime. Iceberg On Apr5, 1:42pm, mdipierro mdipie...@cs.depaul.edu wrote: This is a

[web2py] web2py on github

2010-04-05 Thread elffikk
hi, I use a few project stored on github, and I find it easier to navigate source code or to get a trunk version. What about moving web2py on github? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py] Re: concurrency problem

2010-04-05 Thread Sven
First of all I agree. I can just as well use a full-feature db and I have migrated to postgresql. I was just curious if it was possible/sensible to solve the problem without changing database or my application code; in other words let web2py do it for me. I guess the answer is no ;) Sven -- You

Re: [web2py] Re: Unicode characters problem (Dreamhost installation)

2010-04-05 Thread Alexei Vinidiktov
I just tried copying a working copy of web2py 1.76.5 from my Windows machine to my Dreamhost VPS account, but it didn't solve the problem. I'm still getting the same ticket about DAL not being defined. Is there anything else I can do? 2010/4/5 mdipierro mdipie...@cs.depaul.edu: this is a very

Re: [web2py] Re: concurrency problem

2010-04-05 Thread Vasile Ermicioi
that is an idea! it will be great if web2py will do what sqlalchemy does http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/pooling.html#sqlalchemy.pool.SingletonThreadPool -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this

[web2py] Re: How to use virtualfields?

2010-04-05 Thread Iceberg
Old problem solved, new problem arises. There is a somewhat obvious difference which I did not notice before. (1) db.table.virtualfields.append(ComputedFields()) This need to be executed BEFORE db().select(), otherwise it will NOT affect the select result rows. (2)

Re: [web2py] Re: Unicode characters problem (Dreamhost installation)

2010-04-05 Thread Alexei Vinidiktov
I think I got it to work! I deleted the domain from the control panel altogether and then readded it, and web2py 1.76.5 started working. Problem solved for the time being. I don't know what what the exact cause though. And the problem with Unicode characters is also gone, because it only existed

[web2py] Re: Errors with the new version

2010-04-05 Thread hamdy.a.farag
Massimo, I sent you the patch There's also another problem that I got confused about when using crud.update in case of deleting a record crud.settings.keepvalues = False is not working. after deleting the record , form is not cleared in fact it is not working either in case of updating record or

[web2py] More problems with new version

2010-04-05 Thread Kenneth
As I continue to develop my old application from last summer I get more and more problems that I think is related to the upgrading I did. Now that i try to add a record to att table I get: Traceback (most recent call last): File gluon/restricted.py, line 173, in restricted exec ccode in

[web2py] Re: args problem in 1.76.5

2010-04-05 Thread DenesL
Thank you Jonathan and sorry that I have not been able to contribute more. Until we find a way to fix the missing part it is not really usable. At the risk of repeating myself, this is not only about blanks being converted to underscores which is not the only sanitizing of args done by web2py,

[web2py] Re: cx_Oracle segfaults

2010-04-05 Thread Gabriele Alberti
Hello, yes I am running 1.76.1 (2010-03-01 19:56:55); I'll try the latest and I'll let you know ASAP. Thank you very much, G. On Apr 5, 5:43 am, mdipierro mdipie...@cs.depaul.edu wrote: Thank you Gabriele, is should definitively be threaded=False and not True since web2py does not share

[web2py] Re: cx_Oracle segfaults

2010-04-05 Thread Gabriele Alberti
Hello, I am sorry but I have to disagree. I dont know exactly what happens as I am not into the DAL so much, but as I installed the latest version (running 1.76.5 now) with no threaded argument in the cx_Oracle connection I started getting back segfaults. They disappeared immediately after I put

[web2py] Re: args problem in 1.76.5

2010-04-05 Thread annet
Massimo, The problem is that web2py did replace spaces with underscores, but in version 1.76.x it no longer does. The function described above worked, until I upgraded to version 1.76.5. That's why I have this line of code in my view: h3Nieuws {{=month.replace('_',' ')}}/h3 to have the month

[web2py] Re: web2py production deployment on vps.net (VIDEO)

2010-04-05 Thread ciastek
Christopher, just run web2py.py once after running setup-web2py- ubuntu.sh Details: http://groups.google.com/group/web2py/browse_thread/thread/20e724c51c4dca55/7a6bc911316dd23a On Apr 3, 11:28 am, Christopher Steel chris.st...@gmail.com wrote: With 8.04 64 I am unable to create new

Re: [web2py] Re: webserver slow, misreported

2010-04-05 Thread Timothy Farrell
You are right, I was going to add that feature and then forgot about it. Someone reported a PyPI bug over the weekend (it would not affect web2py). I'll see if I can make the logging a bit more flexible and release a 1.1 in the next few days. In the meantime, look into the cron thing. -tim

[web2py] left join problem

2010-04-05 Thread Jose
I see that the last change you made was: changeset: 362:49d44e1bc17d tag: tip user:mdipie...@massimo-di-pierros-macbook.local date:Fri Apr 02 23:51:07 2010 -0500 summary: possible join problem fix, thanks Brian Harrison After that left =(...) makes an error occurs.

[web2py] XML with custom TAG

2010-04-05 Thread Jason Lotz
I'm trying to pass an XML string with custom TAG to a view, but I'm having trouble with syntax. Required XML Syntax: rows row id=unique_rowid cellcell content/cell cellcell content/cell /row /rows The code string in the controller:

[web2py] Problem with MANY-MANY relationship

2010-04-05 Thread Ishbir
I've got some problem with the MANY-MANY relation in Web2Py. This is my code- http://pastie.textmate.org/903738 Now, the problem is that the query returns only those records which have tags, not the ones without them. However, if I specify query| db.snippets.id0 or anything, it gives me garbled

[web2py] Re: XML with custom TAG

2010-04-05 Thread DenesL
On Apr 5, 9:14 am, Jason Lotz jayl...@gmail.com 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: rows row id=unique_rowid cellcell content/cell cellcell content/cell /row

[web2py] Re: Validator on upload field

2010-04-05 Thread Chris
Thanks, I tried it with trunk and it works. Is trunk considered stable enough to run from it all the time or is it better to stick with the releases and upgrade with each new release? On Apr 2, 8:17 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think this was fixed in trunk a couple of weeks

Re: [web2py] Re: args problem in 1.76.5

2010-04-05 Thread Jonathan Lundell
On Apr 5, 2010, at 3:15 AM, DenesL wrote: Thank you Jonathan and sorry that I have not been able to contribute more. Until we find a way to fix the missing part it is not really usable. At the risk of repeating myself, this is not only about blanks being converted to underscores which is

[web2py] Rows don't serialize well if unicode in _extra

2010-04-05 Thread fgpy
Hi, I have an issue with version 1.76.1, when I use a select statement with several tables storing data in unicode. It seems that when the fields are not fully qualified (like col1 instead of dbname.col1), results are stored in an _extra dictionary. The issue is that when _extra contains

[web2py] Re: XML with custom TAG

2010-04-05 Thread Jason Lotz
Brilliant, Thanks!! Jay On Apr 5, 10:56 pm, DenesL denes1...@yahoo.ca wrote: On Apr 5, 9:14 am, Jason Lotz jayl...@gmail.com 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: rows         row id=unique_rowid

[web2py] Re: Problem with MANY-MANY relationship

2010-04-05 Thread Ishbir
Thinking of ditching MANY-MANY altogether, I have come up with this approach which uses multiple=True- http://web2py.pastebin.com/813ZELF5 However, the problem is that whenever I do something like snippet.tags, it just gives me a string list with the IDs. How do I make it give me a list of the

[web2py] Re: web2py on github

2010-04-05 Thread mdipierro
I somebody wants to keep an official mirror there I have no objection. I prefer to stick with mercurial on Google because mercurial is 100% python. On Apr 5, 1:53 am, elffikk elff...@gmail.com wrote: hi, I use a few project stored on github, and I find it easier to navigate source code or to

[web2py] Re: concurrency problem

2010-04-05 Thread mdipierro
You can already chain them onvalidate=lambda form: (f1(form),f2(form),f3(form)) On Apr 5, 1:14 am, Iceberg iceb...@21cn.com wrote: Good to hear that is on your todo list, Massimo. When you do that, please also figure out a way to chain multi onvalidate functions, because I expect the

[web2py] Re: concurrency problem

2010-04-05 Thread mdipierro
ERRATA: You can already chain them onvalidation=lambda form: (f1(form),f2(form),f3(form)) On Apr 5, 10:34 am, mdipierro mdipie...@cs.depaul.edu wrote: You can already chain them onvalidate=lambda form: (f1(form),f2(form),f3(form)) On Apr 5, 1:14 am, Iceberg iceb...@21cn.com wrote: Good

Re: [web2py] Problem with MANY-MANY relationship

2010-04-05 Thread Thadeus Burgess
Your join is performing a union, your queries could (and will) get quite huge, since your getting a record for every tag. (so for two tags you actually get two rows for that snippet). A left join will provide you with everything, but you still get a row for every tag. Even with a left join you

[web2py] Re: How to use virtualfields?

2010-04-05 Thread mdipierro
You know web2y better than me. I had forgotten about Rows.as_dict() If option 2 works with you, use 2. On Apr 5, 3:13 am, Iceberg iceb...@21cn.com wrote: Old problem solved, new problem arises. There is a somewhat obvious difference which I did not notice before.   (1)

[web2py] Re: Errors with the new version

2010-04-05 Thread mdipierro
another patch? On Apr 5, 4:14 am, hamdy.a.farag hamdy.a.fa...@inbox.com wrote: Massimo, I sent you the patch There's also another problem that I got confused about when using crud.update in case of deleting a record crud.settings.keepvalues = False  is not working. after deleting the record

Re: [web2py] Re: How to use virtualfields?

2010-04-05 Thread Thadeus Burgess
Its slower because each function is executed with the query. So what happens is when you get your rows object, it is the value of the function, not the function. If you wrap all of your functions in a lambda as a lazy function, then it will increase the speed please look at

[web2py] Re: cx_Oracle segfaults

2010-04-05 Thread mdipierro
perhaps I misread your original post. Your patch suggested REMOVING threaded=True and all I am saying is that it is not there. Are you saying I misread your patch and you think threaded=True SHOULD be there? Are you using connection pooling? That may be why it is needed. Massimo On Apr 5, 6:23 

[web2py] Re: Validator on upload field

2010-04-05 Thread mdipierro
I will release a stable one soon. On Apr 5, 10:05 am, Chris crflei...@gmail.com wrote: Thanks, I tried it with trunk and it works. Is trunk considered stable enough to run from it all the time or is it better to stick with the releases and upgrade with each new release? On Apr 2, 8:17 pm,

[web2py] Re: Rows don't serialize well if unicode in _extra

2010-04-05 Thread mdipierro
What do you mean by when the fields are not fully qualified (like col1 instead of dbname.col1) ? On Apr 5, 10:19 am, fgpy franck...@gmail.com wrote: Hi, I have an issue with version 1.76.1, when I use a select statement with several tables storing data in unicode. It seems that when the

[web2py] Using the Google Data APIs in my GAE web2py project

2010-04-05 Thread Leandro - ProfessionalIT
Hi Friends, In the documentation of gdata-python-client library I have this: Using the gdata-python-client library Google offers a Google Data Python client library that simplifies token management and requesting data from specific Google Data APIs. We recently released a version of this

[web2py] Re: cx_Oracle segfaults

2010-04-05 Thread Gabriele Alberti
Hello, I am not using connection pooling, and threaded=True is needed to avoid segfaults. I dont know why this happens, my wild guess is that cx_Oracle (or its underlying libs), when used in the same process, also if different threads, share something between different connections, needing

[web2py] Re: Unicode characters problem (Dreamhost installation)

2010-04-05 Thread Yarko Tymciurak
On Apr 5, 3:23 am, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: I think I got it to work! I deleted the domain from the control panel altogether and then readded it, and web2py 1.76.5 started working. Problem solved for the time being. I don't know what what the exact cause though.

[web2py] Re: left join problem

2010-04-05 Thread mdipierro
Please check now. Is it fixed? On Apr 5, 7:56 am, Jose jjac...@gmail.com wrote: I see that the last change you made was: changeset:   362:49d44e1bc17d tag:         tip user:        mdipie...@massimo-di-pierros-macbook.local date:        Fri Apr 02 23:51:07 2010 -0500 summary:     possible

[web2py] Re: cx_Oracle segfaults

2010-04-05 Thread mdipierro
in trunk On Apr 5, 11:52 am, Gabriele Alberti gabriele.albe...@gmail.com wrote: Hello, I am not using connection pooling, and threaded=True is needed to avoid segfaults. I dont know why this happens, my wild guess is that cx_Oracle (or its underlying libs), when used in the same process,

[web2py] Re: Unicode characters problem (Dreamhost installation)

2010-04-05 Thread Yarko Tymciurak
On Apr 5, 11:55 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Apr 5, 3:23 am, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: I think I got it to work! I deleted the domain from the control panel altogether and then readded it, and web2py 1.76.5 started working. Problem

[web2py] Re: left join problem

2010-04-05 Thread Jose
On 5 abr, 16:58, mdipierro mdipie...@cs.depaul.edu wrote: Please check now. Is it fixed? still gives the same error. There is also a syntax error in tools.py in lina 2024, missing the colon. if form.accepts(request.post_vars, _session, formname=_formname,

[web2py] Re: left join problem

2010-04-05 Thread mdipierro
One more try please. On Apr 5, 12:49 pm, Jose jjac...@gmail.com wrote: On 5 abr, 16:58, mdipierro mdipie...@cs.depaul.edu wrote: Please check now. Is it fixed? still gives the same error. There is also a syntax error in tools.py in lina 2024, missing the colon. if

[web2py] Re: left join problem

2010-04-05 Thread Jose
On 5 abr, 17:59, mdipierro mdipie...@cs.depaul.edu wrote: One more try please. Now, it works well! Thank you. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from

[web2py] Building a query from a form

2010-04-05 Thread Johann Spies
Using this form: veld = ['affiliation', 'country','year','journal','author'] form = SQLFORM.factory( Field('k', label='Type in up to 5 keywords separated by ' '(spaces).',requires=IS_NOT_EMPTY()), Field('how', label='Search all or any of the keywords',default='all', requires

[web2py] Re: Building a query from a form

2010-04-05 Thread mdipierro
query = query(db.sarua[request.vars.refine.lower()].like('%'+request.vars.value.lower + '%')) On Apr 5, 1:34 pm, Johann Spies johann.sp...@gmail.com wrote: Using this form:   veld = ['affiliation', 'country','year','journal','author']    form = SQLFORM.factory(         Field('k',

[web2py] bug in dal.py _first() and SQLFORM ._tablename

2010-04-05 Thread Thadeus Burgess
I get this traceback when attempting to access a reference field. rows = db().select(db.table.ALL) for r in rows: r.id r.title r.reference_field.name r.reference_field.description Traceback (most recent call last): File /home/tburgess/Applications/web2py/gluon/restricted.py, line 173,

[web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-04-05 Thread mdipierro
I fixed the former. I did not fix the latter. It is a known problem with the new dal and one of the few things that needs to be ironed out: it does not like select('fieldname') only select(db.table['fieldname']). Not difficult to fix anyway. On Apr 5, 2:13 pm, Thadeus Burgess

[web2py] DAL query count patch

2010-04-05 Thread Thadeus Burgess
Attached is a patch to allow the dal.py to keep track of query counts and types. Usage db.qry_count() {'SELECT': 5, 'INSERT': 2, 'DELETE': 1} Massimo, do you accept? -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this

[web2py] Re: DAL query count patch

2010-04-05 Thread mdipierro
I do not see any reason against except that I do not see any reason in favor either. Why do you need it? Massimo On Apr 5, 2:16 pm, Thadeus Burgess thade...@thadeusb.com wrote: Attached is a patch to allow the dal.py to keep track of query counts and types. Usage db.qry_count()

Re: [web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-04-05 Thread Thadeus Burgess
Now I get this for reference field Traceback (most recent call last): File /home/tburgess/Applications/web2py/gluon/restricted.py, line 173, in restricted exec ccode in environment File /home/tburgess/Applications/web2py/applications/pms/views/default/index.html, line 84, in module

Re: [web2py] Re: DAL query count patch

2010-04-05 Thread Thadeus Burgess
Novelty. Many websites you see will have at the bottom time took to process request, number of queries to database. -Thadeus On Mon, Apr 5, 2010 at 2:24 PM, mdipierro mdipie...@cs.depaul.edu wrote: I do not see any reason against except that I do not see any reason in favor either. Why do

[web2py] Re: DAL query count patch

2010-04-05 Thread mdipierro
But this does not count the time, just the number of past requests (in thread? total?). Am I wrong? Moreover the count will be wrong if the web server restarts the process. no? Massimo On Apr 5, 2:33 pm, Thadeus Burgess thade...@thadeusb.com wrote: Novelty. Many websites you see will have at

[web2py] Re: webserver slow, misreported

2010-04-05 Thread Michael Toomim
Thanks guys. Each time I run a test, though, it costs me money because I'm paying people on mechanical turk. And if it's slow, it gives me a bad reputation. So I don't want to run more slow tests unless we have good request time logging in place and a good hypothesis to test. Wouldn't cron

[web2py] Re: webserver slow, misreported

2010-04-05 Thread Michael Toomim
and I'm using postgres not sqlite. On Apr 5, 12:44 pm, Michael Toomim too...@gmail.com wrote: Thanks guys.  Each time I run a test, though, it costs me money because I'm paying people on mechanical turk.  And if it's slow, it gives me a bad reputation.  So I don't want to run more slow tests

[web2py] Re: webserver slow, misreported

2010-04-05 Thread mdipierro
yes. good point. Massimo On Apr 5, 2:44 pm, Michael Toomim too...@gmail.com wrote: Thanks guys.  Each time I run a test, though, it costs me money because I'm paying people on mechanical turk.  And if it's slow, it gives me a bad reputation.  So I don't want to run more slow tests unless we

Re: [web2py] Re: DAL query count patch

2010-04-05 Thread Thadeus Burgess
Ah, well the real goal is for it to only be the number of statements pending in a given transaction. So db.commit() or db.rollback() should clear the results... The time counting I am doing in my models, and in response._caller... but this is not including time taken to set up the environment

[web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-04-05 Thread mdipierro
try now On Apr 5, 2:30 pm, Thadeus Burgess thade...@thadeusb.com wrote: Now I get this for reference field Traceback (most recent call last):   File /home/tburgess/Applications/web2py/gluon/restricted.py, line 173, in restricted     exec ccode in environment   File

[web2py] Re: DAL query count patch

2010-04-05 Thread mdipierro
Since the new DAL is a class you can define them by subclassing DAL. What do you think? I am not convinced this is useful in general and needs to be in trunk. It seems a very specialized application but perhaps I am missing something. I'd like to hear what other people think about this. On Apr 5,

Re: [web2py] Re: Building a query from a form

2010-04-05 Thread Johann Spies
Thanks. Johann -- Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning. James 1:17 -- You received this message because you are subscribed to

[web2py] Re: webserver slow, misreported

2010-04-05 Thread AchipA
Can you elaborate how can cron cause database locking issues (apart from such issues being caused by child processes)? The content of the crontab is irrelevant, whether you only have @reboot or more makes no difference. If there would be no check, you could not change cron parameters without

Re: [web2py] Re: Building a query from a form

2010-04-05 Thread Johann Spies
query = query(db.sarua[request.vars.refine.lower()].like('%'+request.vars.value.lower+ '%')) TypeError: cannot concatenate 'str' and 'builtin_function_or_method' objects :( Regards Johann -- Every good gift and every perfect gift is from above, and cometh down from the Father

Re: [web2py] Re: DAL query count patch

2010-04-05 Thread Thadeus Burgess
I would like to hear what others think as well. I do not see how the DAL class knows, could know, might know, when a query is being executed? -Thadeus On Mon, Apr 5, 2010 at 3:15 PM, mdipierro mdipie...@cs.depaul.edu wrote: Since the new DAL is a class you can define them by subclassing

[web2py] Re: webserver slow, misreported

2010-04-05 Thread mdipierro
As far as I know cron cannot lock. Only child processes can lock. As far as I know cron works fine. Yet I am trying to isolate the problem cron is one of those few things that may differ when running with apache or its own web server. Massimo On Apr 5, 3:20 pm, AchipA attila.cs...@gmail.com

[web2py] Re: Building a query from a form

2010-04-05 Thread mdipierro
grrr query = query(db.sarua[request.vars.refine.lower()].like('%'+request.vars.value.lower() +'%')) or (equivalent) query = query(db.sarua[request.vars.refine.lower()].like('%'+request.vars.value +'%')) On Apr 5, 3:24 pm, Johann Spies johann.sp...@gmail.com wrote:   query =

[web2py] Re: DAL query count patch

2010-04-05 Thread mdipierro
this is a good point. So the question is now: should we just count calls or, for example, store them in a list the order they are executed (per transaction), or perhaps just store the type of queries in a list? What does the app need to know about the queries being executed? On Apr 5, 3:27 pm,

Re: [web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-04-05 Thread Thadeus Burgess
Traceback (most recent call last): File /home/tburgess/Applications/web2py/gluon/restricted.py, line 173, in restricted exec ccode in environment File /home/tburgess/Applications/web2py/applications/pms/controllers/default.py, line 278, in module File

[web2py] new session

2010-04-05 Thread Jonathan Lundell
I'd have thought that if I log out and then log back in I'd get a new session. But apparently not. Is there a reason to do it one way vs the other? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py] there is a git hg plugin

2010-04-05 Thread dspiteself
Using your mercurial client you could setup 2 remotes. One remote be github and one be your mercurial repository. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from

[web2py] recaptcha in LOAD not working

2010-04-05 Thread selecta
I tried to use Recaptcha in a LOAD div but I does not work The problem is that the page stats reloading when it gets to the div loaded with LOAD where the recaptcha javascripts are in and gets stuck on reloading it controller: ... form = SQLFORM.factory(Field('tag_name')) captcha = None if not

Re: [web2py] recaptcha in LOAD not working

2010-04-05 Thread Thadeus Burgess
It is because recaptcha uses ajax to communicate, and when using LOAD web2py traps all ajax calls, so the recaptcha requests are not making it to the server. -Thadeus On Mon, Apr 5, 2010 at 5:05 PM, selecta gr...@delarue-berlin.de wrote: I tried to use Recaptcha in a LOAD div but I does not

[web2py] Re: new SQLFORM

2010-04-05 Thread Russell
Just a thought... It occurs to me that, as SQLFORM is a set of fields, wouldn't it be better if SQLFORMs had their own widget class? It would allow for customization and, potentially you could then combine SQLTABLE with SQLFORM into one tidy concept. By this I mean that SQLTABLE could deliver a

[web2py] Re: recaptcha in LOAD not working

2010-04-05 Thread selecta
tnx Thadeus just found http://recaptcha.net/apidocs/captcha/client.html reCAPTCHA AJAX API will read into it 2morrow would be nice if recaptcha works with web2pys ajax things by default On Apr 6, 12:10 am, Thadeus Burgess thade...@thadeusb.com wrote: It is because recaptcha uses ajax to

[web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-04-05 Thread mdipierro
uploading fix. please check it. Thanks for testing this. On Apr 5, 3:59 pm, Thadeus Burgess thade...@thadeusb.com wrote: Traceback (most recent call last):   File /home/tburgess/Applications/web2py/gluon/restricted.py, line 173, in restricted     exec ccode in environment   File

[web2py] Re: new session

2010-04-05 Thread mdipierro
Yes. To recycle session and to keep track of what visitors do, even when they are not logged in. You can change it. Try this: auth.settings.login_accept =lambda form: (session.clear(),session.auth=auth) On Apr 5, 4:34 pm, Jonathan Lundell jlund...@pobox.com wrote: I'd have thought that if I log

[web2py] Re: there is a git hg plugin

2010-04-05 Thread mdipierro
hmmm. I do not object but I do not want to do any extra work. I do not use a client except the shell one. If you send me a script to do it, I will use it. On Apr 5, 5:04 pm, dspiteself dspites...@gmail.com wrote: Using your mercurial client you could setup 2 remotes. One remote be github and

[web2py] Re: new SQLFORM

2010-04-05 Thread mdipierro
interesting I will think about it. Should be possible. On Apr 5, 5:23 pm, Russell russell.mcmur...@gmail.com wrote: Just a thought... It occurs to me that, as SQLFORM is a set of fields, wouldn't it be better if SQLFORMs had their own widget class? It would allow for customization and,

Re: [web2py] Re: Unicode characters problem (Dreamhost installation)

2010-04-05 Thread Alexei Vinidiktov
2010/4/6 Yarko Tymciurak resultsinsoftw...@gmail.com: On Apr 5, 11:55 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Apr 5, 3:23 am, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: I think I got it to work! I deleted the domain from the control panel altogether and then

Re: [web2py] Re: recaptcha in LOAD not working

2010-04-05 Thread Thadeus Burgess
Maybe the web2py_ajax_trap can have a write-through put in so it will not intercept communications for recaptcha? -Thadeus On Mon, Apr 5, 2010 at 5:28 PM, selecta gr...@delarue-berlin.de wrote: tnx Thadeus just found http://recaptcha.net/apidocs/captcha/client.html reCAPTCHA AJAX API

[web2py] Re: Rows don't serialize well if unicode in _extra

2010-04-05 Thread fgpy
More details here: I have 2 tables: shop (2 fields) and enquete (18 fields). I use an inner join like the one bellow. 'shop.shop_code' is what I call a fully qualified name 'hht_q_1' is what I call a short name. All those names end to be in _extra and as they contain some unicode, the __str__

Re: [web2py] Re: Rows don't serialize well if unicode in _extra

2010-04-05 Thread Thadeus Burgess
When dealing with 1 table, names are short names When dealing with multiple tables, all names are fully qualified. -Thadeus On Mon, Apr 5, 2010 at 8:22 PM, fgpy franck...@gmail.com wrote: More details here: I have 2 tables: shop (2 fields) and enquete (18 fields). I use an inner join

[web2py] Re: recaptcha in LOAD not working

2010-04-05 Thread mdipierro
I am not sure that is the problem. ajax_trap does not trap ajax requests but form submissions. I need to give this a try. Massimo On Apr 5, 8:15 pm, Thadeus Burgess thade...@thadeusb.com wrote: Maybe the web2py_ajax_trap can have a write-through put in so it will not intercept communications

[web2py] Basic authentication question

2010-04-05 Thread Alexei Vinidiktov
Hello, I'm trying to make a desktop client written in Python 2.5 (on Windows) communicate with a web2py 1.76.5 based app using services. It works fine with services that don't require authentication, but I was wondering if I could make it authenticate the user with Basic authentication. I've

[web2py] Vim snippets for web2py

2010-04-05 Thread DenesL
Leonardo Vidarte, one of the users in the spanish language group, has created some snippets [0] for Vim, for the snipMate plugin [1] to be exact, with all the API of web2py 1.76.3, including some basic snippets for template creation. Hopefully they will be useful to somebody. Additions are

[web2py] Re: Basic authentication question

2010-04-05 Thread mdipierro
you need in db.py auth.settings.allow_basic_login = True it defaults to False On Apr 5, 9:21 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Hello, I'm trying to make a desktop client written in Python 2.5 (on Windows) communicate with a web2py 1.76.5 based app using services. It

Re: [web2py] Re: Basic authentication question

2010-04-05 Thread Alexei Vinidiktov
Thanks a lot, Massimo! It worked! On Tue, Apr 6, 2010 at 10:36 AM, mdipierro mdipie...@cs.depaul.edu wrote: you need in db.py auth.settings.allow_basic_login = True it defaults to False On Apr 5, 9:21 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Hello, I'm trying to make a

[web2py] Re: Basic authentication question

2010-04-05 Thread mdipierro
thank you for trying it. It is one of those features that not many people are using but should be solid. Massimo On Apr 5, 9:44 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Thanks a lot, Massimo! It worked! On Tue, Apr 6, 2010 at 10:36 AM, mdipierro mdipie...@cs.depaul.edu

[web2py] GAE native types.

2010-04-05 Thread Matt
Hi there, In the features not in the book section it lists since version 1.74.5 * support for all native types on GAE (e.g. StringListProperty) Are there any examples demonstrating the use of these available? Thanks, Matt -- You received this message because you are subscribed to the Google

[web2py] Re: GAE native types.

2010-04-05 Thread mdipierro
For example: from gluon.contrib.gql import gae db.define_table('tablename',,Field('name',gae.StringListProperty),) You can use any native type but forms may not work because you have to make sure you insert the corresponding type (in the example a list of strings). Sorry there is not

Re: [web2py] Re: Basic authentication question

2010-04-05 Thread Alexei Vinidiktov
I just tried it with this json-rpc lib ( http://www.desfrenes.com/python-json-rpc ) , and it also seems to work fine. I have many more open questions about authentication and authorization. I'm exploring different approaches for my application: cookie-based, basic, token authentication, and

[web2py] Re: GAE native types.

2010-04-05 Thread Matt
Thanks for your prompt response :) Trying your example: from gluon.contrib.gql import gae db.define_table('example', db.Field('title', 'string'), db.Field('name', gae.StringListProperty)) as a quick test but I'm getting an error: Traceback (most recent call last): File

[web2py] Re: Basic authentication question

2010-04-05 Thread mdipierro
you can try define something like ths def catch303(f): try: return f() except HTTP, http: if http.status==303: return 'error' raise http and appy the additional decorator on top of auth.requires_login @catch303 @auth.requires_login() Massimo On Apr 5, 10:50 pm, Alexei

Re: [web2py] Re: Basic authentication question

2010-04-05 Thread Alexei Vinidiktov
Thanks, Massimo. I'll try. On Tue, Apr 6, 2010 at 12:26 PM, mdipierro mdipie...@cs.depaul.edu wrote: you can try define something like ths def catch303(f):    try: return f()    except HTTP, http:       if http.status==303: return 'error'       raise http and appy the additional

[web2py] Re: GAE native types.

2010-04-05 Thread mdipierro
odd. The code there says: if isinstance(field.type, gluon.sql.SQLCustomType): ftype = self._db._translator[field.type.native or field.type.type](**attr) elif isinstance(field.type, gae.Property): ftype = field.type elif

[web2py] Flatpages plugin

2010-04-05 Thread Mariano Reingart
Hi, attached is plugin_flatpages, a dynamic wiki/html user editable pages plugin. It supports: * page edition by users (in the same page) * page history * preview * format conversion (markdown/html) * internationalization (a page for each language) It was based on: * my web2py2-wiki

[web2py] Re: GAE native types.

2010-04-05 Thread Matt
Just had a quick look into gql.py and yes in the _create method around line 214 I've got those lines you mentioned. I'm running web2py 1.76.5 (2010-03-11 15:19:08) with GAE launcher version 1.3.2 Matt On Apr 6, 4:31 pm, mdipierro mdipie...@cs.depaul.edu wrote: odd. The code there says: