[web2py] Make gluon components accessible in mod_wsgi

2013-01-13 Thread Daniel Gonzalez
Hi, As part of my library, I have a module which I use to wrap some web2py components. Let's say I have simple.py: from gluon.html import B def my_b(txt): return B(txt) To successfully import this module, my pwd needs to be the directory where web2py is installed. Otherwise I get the

[web2py] Putting the session in memcache does not work

2013-01-13 Thread Daniel Gonzalez
Hi, I have 0_memcache.py in my models, with following content: from gluon.contrib.memcache import MemcacheClient memcache_servers = ['127.0.0.1:11211'] cache.memcache = MemcacheClient(request, memcache_servers) cache.ram = cache.disk = cache.memcache Now in my db.py model, I have defined (close

[web2py] Re: Putting the session in memcache does not work

2013-01-13 Thread Niphlod
I think that you need to restart web2py completely because for performances reasons the location of the session (meaning filesystem, cookie, memcache, redis) is evaluated one-time-only can you try restarting the web2py process (or apache, or uwsgi, depending on your setup...) ? On Sunday,

[web2py] Re: Hierarchical Database Selection

2013-01-13 Thread Dave Cenker
Excellent! This works just as advertised for obtaining the companies and the solution works in my application. I very much appreciate the solution. I was wondering if this was analogous to the following syntax in Django: train.objects.filter(company__name='Amtrak') Please, no offense,

[web2py] scheduler error message

2013-01-13 Thread Martin Weissenboeck
The scheduler calls two diffent functions. In bothes the scheduler_run table contains: Traceback (most recent call last): File /home/www-data/web2py/gluon/scheduler.py, line 214, in executor _env = env(a=a, c=c, import_models=True) File /home/www-data/web2py/gluon/shell.py, line 137, in

[web2py] Re: Putting the session in memcache does not work

2013-01-13 Thread Daniel Gonzalez
Thanks Niphlod, you hit it right again! On Sunday, January 13, 2013 1:26:32 PM UTC+1, Niphlod wrote: I think that you need to restart web2py completely because for performances reasons the location of the session (meaning filesystem, cookie, memcache, redis) is evaluated one-time-only

Re: [web2py] Re: Hierarchical Database Selection

2013-01-13 Thread Vasile Ermicioi
django rows = train.objects.filter(company__name='Amtrak') web2py rows = db((db.trains.company==db.company.id) (db.company.name=='Amtrak') ).select(*db.trains.fields) for me web2py way is better because it mimics real sql query but I agree that it could look better, for example

[web2py] Re: parse_as_rest queries

2013-01-13 Thread DenesL
Thank you, it still needs more work: Traceback (most recent call last): File C:\w2p\trunk\gluon\restricted.py, line 212, in restricted exec ccode in environment File C:\w2p\trunk\applications\test\controllers/rest.py, line 28, in module File C:\w2p\trunk\gluon\globals.py, line 193, in

[web2py] Re: parse_as_rest, many to many and multiple tables

2013-01-13 Thread DenesL
Hi pin, However I need to be able to perform a call that allows me to pass in the person's id and provides the info for all the pets owned by that person. '/pets/{ownership.personid}' Also taking it a step further I want to be able to provide a list of toy names for all the toys owned by

Re: [web2py] Re: SQLFORM.grid with reference

2013-01-13 Thread __pyslan__ - Ayslan Jenken
Ok. Thanks! On Fri, Jan 11, 2013 at 7:39 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: About 1) my mistake. Try: headers = { 'reading.serie_number':T('**Serie Number'), The keys should be the names of fields (all lower cases in your case). About 2) Please

[web2py] Re: Project: pydev extension for web2py in Eclipse

2013-01-13 Thread Álvaro José Iradier
Hi, I get back to this thread again as I recently got a notification from the feature request on Sourceforge.I had it nearly forgotten, but I think it is still interesting and it looks like the author of Pydev is thinking about including the web2py support. You can see my original proposal and

[web2py] Problem with New application wizard; plugin_attachements.py

2013-01-13 Thread Rob Paire
Hello - Running the New application Wizard (requires internet access) from version 2.3.2 and choosing the Plugin Option: attachments will output code which contains an error in the auto-generated* plugin_attachments.py *module. The error is on line 5 shown below:

[web2py] web2py, stripe, and pci compliance

2013-01-13 Thread Ragtime AllTime
Hello all, I'm looking into using stripe.com as a payment processor for web2py. It looks like web2py provides a nice and easy way for this, but I am a bit worried about pci compliance. On this site shows an example: http://web2py.com/books/default/chapter/29/14#Stripe.com But no where on the

Re: [web2py] Re: Hierarchical Database Selection

2013-01-13 Thread Niphlod
I won't argue with the difference between an ORM or a DAL, but just for the sake of discussion for future references, I'll tackle this from another angle.. We (I'll include myself in the group) that work on databases daily have a bad attitude towards super-normalizing things that maybe

[web2py] Re: scheduler error message

2013-01-13 Thread Niphlod
did you try to raise the timeout ? On Sunday, January 13, 2013 2:43:12 PM UTC+1, mweissen wrote: The scheduler calls two diffent functions. In bothes the scheduler_run table contains: Traceback (most recent call last): File /home/www-data/web2py/gluon/scheduler.py, line 214, in executor

[web2py] Re: Make gluon components accessible in mod_wsgi

2013-01-13 Thread Massimo Di Pierro
Does this help? http://stackoverflow.com/questions/6525243/how-to-modify-pythonpath-for-a-wsgi-application-in-alwaysdata-net else you can set PYTHON_PATH as an environment variable and append /path/to/web2py there. On Sunday, 13 January 2013 03:46:41 UTC-6, Daniel Gonzalez wrote: Hi, As

[web2py] Re: parse_as_rest queries

2013-01-13 Thread Massimo Di Pierro
I have fixed the first error too but not sure where the second comes from. Can you help? On Sunday, 13 January 2013 09:25:13 UTC-6, DenesL wrote: Thank you, it still needs more work: Traceback (most recent call last): File C:\w2p\trunk\gluon\restricted.py, line 212, in restricted

[web2py] Re: web2py, stripe, and pci compliance

2013-01-13 Thread Massimo Di Pierro
I do not know if it is PCI compliant. The provided code requires that your application handles (although not stores) credit card info. Massimo On Sunday, 13 January 2013 12:16:44 UTC-6, Ragtime AllTime wrote: Hello all, I'm looking into using stripe.com as a payment processor for web2py.

[web2py] Re: Problem with New application wizard; plugin_attachements.py

2013-01-13 Thread Massimo Di Pierro
You cannot have a field name called file. Previous versions of web2py did not check and allowed it because sqlite allow it. Then users run into problems when moving to mysql or postgresql which do not allow it. Mind this is an issue only with new applications. Massimo On Sunday, 13 January

Re: [web2py] Re: scheduler error message

2013-01-13 Thread Martin Weissenboeck
Repeats: 0=unlimitedRetry Failed: -1=unlimitedPeriod: secondsTimeout: secondsSync Output: update output every n sec: 0=never Times Run: Times Failed: Tiemout:300 seconds. The called functions needs about 2 seconds to complete. 2013/1/13 Niphlod niph...@gmail.com did you try to raise the timeout

Re: [web2py] Re: scheduler error message

2013-01-13 Thread Martin Weissenboeck
Now I have tried to reduce this problem: There is only one function in myscheduler: myscheduler = Scheduler (db, dict( testmail=testmail, )) And testmail is: def testmail(text='mytext'): res = send_email( to='myaddr...@gmail.com', subject=subject: %s

Re: [web2py] Re: Hierarchical Database Selection

2013-01-13 Thread Vasile Ermicioi
That way you can issue queries like db.trains.company == 'amtrack' that are - usually - faster than filtering records through joins. you can't do db.trains.company == 'amtrack' because company is a reference field --

Re: [web2py] Re: scheduler error message

2013-01-13 Thread Martin Weissenboeck
Solved. I have tried to use request.env.server_name in db.py 2013/1/13 Martin Weissenboeck mweis...@gmail.com Now I have tried to reduce this problem: There is only one function in myscheduler: myscheduler = Scheduler (db, dict( testmail=testmail, )) And testmail is: def

[web2py] help with ckeditor?

2013-01-13 Thread samuel bonilla
hi all, I am using the ckeditor plugin (https://bitbucket.org/PhreeStyle/web2py_ckeditor/wiki/Home). I want add the tag code in ckeditor, to insert code how it works in www.web2pyslices.com, any ideas or suggestions. How can i do it? thanks.. --

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-13 Thread Kostas M
Sorry about the duplicate posts... It seems they have been posted on the mails, but still not appearing on the web interface... I got all four copies, fwiw. --

[web2py] Re: parse_as_rest queries

2013-01-13 Thread DenesL
It seems to be from the data, it is a legacy table. Using 4607 trunk a manual select gives: Traceback (most recent call last): File console, line 1, in module File C:\w2p\trunk\gluon\dal.py, line 9181, in select return adapter.select(self.query,fields,attributes) File

[web2py] Re: parse_as_rest queries

2013-01-13 Thread DenesL
Suggestions to override parse_blob are welcome. --

[web2py] Re: parse_as_rest queries

2013-01-13 Thread Massimo Di Pierro
web2py uses b64encode/decode to store/retrieve data in blobs. Legacy tables probably do not do it. You need you make your own custom adapter to override a method. For example for PostgreSQL: from gluon.dal import ADAPTERS, UseDatabaseStoredFile,PostgreSQLAdapter class

[web2py] Looking for a web2py/mysql performance expert

2013-01-13 Thread Furayo
Hi, We are looking with somebody with experience in performance optimization and general administration on web2py mysql. This would be a remote, part time job. As we are just doing our first data loads I would expect this to be take 10-15 hours of your time in the next two weeks, then go down

[web2py] Cannot change PasswordWidget class in view for custom auth form.

2013-01-13 Thread Aris Green
Why does this code not work? {{=form.custom.begin}} # some junk here, next line does not work {{ form.custom.widget.password['_class'] = 'string input-medium' }} I want to override the default password input widget CSS class in the view, and it refuses to be overridden. I need flexibility

[web2py] Burned by web2py.js ... again

2013-01-13 Thread weheh
I upgraded to web2py 2.3.2 last week and got burned by web2py.js breaking backwards compatibility with my component file upload. This is probably the 3rd time this has happened to me, so shame on me for not taking precautions. Nevertheless, I think it highlights an underlying web2py problem.

[web2py] TypeError: __call__() takes exactly 3 arguments (4 given)

2013-01-13 Thread aabelyakov
ubuntu v.11.04 (Natty), v.12.04 (Precise), windows 8 web2py v.2.3.2 (2012-12-17 15:03:30) stable When you run web2py.py without parameter -a recycle Exception in Tkinter callback Traceback (most recent call last): File /usr/lib/python2.7/lib-tk/Tkinter.py, line 1413, in __call__ return