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
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
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,
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,
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
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
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
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
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
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
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
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:
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
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
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
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
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
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.
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
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
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
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
--
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
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..
--
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.
--
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
Suggestions to override parse_blob are welcome.
--
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
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
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
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.
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
32 matches
Mail list logo