, but the module is labeled FOR INTERNAL USE
ONLY so I do not know whether it is a good idea to try it directly
somehow :)
Thanks,
David
- --
David Zejda
http://www.tabang.eu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Hi Massimo, please, were you able to look at it?
I'm getting the same error relatively often, several times a day one a
site with about 1 daily requests.
Thanks :)
David
On Feb 23, 9:31 am, mdipierro mdipie...@cs.depaul.edu wrote:
will look into this.
--
You received this message because
Thanks. The workaround works, even when keeping the pool. :)
D.
try:
db=DAL(mysql://a:b...@localhost/c, pool_size=5)
except:
db=DAL(mysql://a:b...@localhost/c, pool_size=5)
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to
Hello :)
I'd like to do something like this:
def load_chapter(book, chapter):
args = ('Alice', 3)
a = cache.ram('%s_%s' % args, load_chapter, arguments=args,
time_expire=50)
where the cache would execute load_chapter('Alice', 3) if necessary.
Any advices, please?
Regards,
David
--
Hi,
is it true, that languages.py reads language files per request (using
read_dict)?
If so, is it be possible to cache the loaded languages somehow?
Thanks!
David
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send
Thanks :)
I'll report if I find any troubles...
D.
On Mar 26, 6:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:
I changed this in trunk. The language files are now cached but please
check that I did not not break them.
--
You received this message because you are subscribed to the Google
Hi Massimo,
i touched it to cache function instead of constructor:
class Blah:
def sessiontime(self):
return session.ctime
def cache_test():
import time
session.ctime = time.ctime()
def blah():
return Blah()
b = cache.ram('blah',blah,30)
return
I tried to move the part which asks session for the ctime value into a
model:
def sestime():
return session.ctime
In controller there is:
class Blah:
def sessiontime(self):
return sestime()
def cache_test():
import time
session.ctime = time.ctime()
def blah():
I played with the cache more. If I pass current session to the object
loaded from cache, it works OK, I mean the times returned are equal:
class Blah:
def sessiontime(self, session):
globals()['session'] = session
return session.ctime
def cache_test():
import time
Hmm.. I had to cut my objects into parts, those which hold data are
being cached while those with logic are not... kind of hack, but I'm
no more directly affected by the bug.
D.
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this
Hi,
I'm aggresively caching nearly everything.. it helped to reduce
database queries and increase performance in result. But I have
another problem now - memory usage slowly grows, during a day my
server eats about 2 GB. If I flush cache by clear() function, it does
not help much. Something it's
about the cause for this problem, please keep
us posted.
Massimo
On Apr 9, 4:28 pm, David Zejda d...@atlas.cz wrote:
Hi,
I'm aggresively caching nearly everything.. it helped to reduce
database queries and increase performance in result. But I have
another problem now - memory usage
Hi,
headers of my mails are being encoded to utf-8, which causes troubles
with delivery.
e.g. 'dvid[at]atlas.cz' (where [at] is '@') is being encoded as
=?utf-8?q?dvid=40atlas=2Ecz?=
processed by mailserver as:
=?utf-8?q?dvid=40atlas=2ec...@crfreenet.org
after decoding:
Yes, I agree, it seems as a good solution :)
On May 5, 8:24 pm, mdipierro mdipie...@cs.depaul.edu wrote:
I guess we should check is the address contains non-ascii chars, and
use ore of the other depedning on the result.
Hi,
my web2py instance (about 1 pageviews, 30+ ajax requests
daily) crashes about daily. As a workaround I have a script which
(re)starts the server when either memory usage exceeds certain
threshold or when the server is completely down. I run the script from
cron every minute.
#!
...@swgen.com wrote:
Can you be more specific on what you mean by crashing? Interpreted
languages shouldn't crash and generally if they do it's something wrong
with the interpreter. Are you using cPython?
On 5/7/2010 1:48 AM, David Zejda wrote:
Hi,
my web2py instance (about 1 pageviews
:36 AM, David Zejda wrote:
AFAIK web2py uses cherrypy webserver, which listens as a daemon on
certain port. With crashing I mean that the listening process (web2py
with cherrypy at the background) suddenly terminates. I use standard
Python v 2.5.2 as packaged for Debian.
David
On May
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I had to add
value = value == '||' and [] or value[1:-1].split(|)
to make it working properly with existing data rows:
class MultipleOptionsWidget2(OptionsWidget):
@staticmethod
def widget(field, value, size=5, **attributes):
and Wing IDE deeply and what the results
are. You response will be greatly appreciated. Thank you!
On May 1, 4:26 am, David Zejda d...@atlas.cz wrote:
Today I evaluated several Python IDEs, with results:
Idle
for me, debugging does not work
Eric4
debugging does not work, breakpoints
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
thanks for web2py, I still feel the fresh air of a productive development :)
And now the question. There is a table with a text field. I'd like to
integrate SQLFORM and a wysiwyg editor of some kind to operate on the
field. I do not have any
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I just see nicEdit and the correspodning thread
http://groups.google.com/group/web2py/browse_thread/thread/f8922ebf566f3f1c
sorry for asking. I'll give it a try.
D.
David Zejda napsal(a):
Hello,
thanks for web2py, I still feel the fresh air
folder or just the applications folder or just the specific
applications?
On Jun 14, 5:49 am, David Zejda d...@atlas.cz wrote:
Hello,
I did not perform a deep comparison. I only installed the tools and
checked the basic functionality with emphasize on debugging of web2py,
which effectively
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I have table with a subject field, with default value specified in model.
Now I would like to generate forms to add and update records.
In the forms the default value specified in the model has to be
overriden on certain conditions.
I tried
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Please, do you have any advices?
David Zejda napsal(a):
Hello,
I have table with a subject field, with default value specified in model.
Now I would like to generate forms to add and update records.
In the forms the default value specified
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
my db backend is MySQL 5.0.51a-24 on Linux.
If I try to gently alter already generated table schema, like to rename
SQLField('relation', 'text', requires = \
IS_NULL_OR(IS_IN_DB(db, 'relation_type.id', 'relation_type.id',
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
for
IS_NULL_OR(IS_IN_DB(db, 'table.id', 'table.name'))
SQLForm generates a combo with a None as a selectable value.
There is also a relatively new support for multiple fields:
IS_IN_DB(db, 'table.id', 'table.name', multiple=True)
It
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My tables are actually InnoDB - they are generated by DAL.
D.
mdipierro napsal(a):
The DAL assumes InnoDB, not MYISAM. Perhaps that is the problem?
On Jul 20, 12:05 pm, David Zejda d...@atlas.cz wrote:
Hello,
my db backend is MySQL 5.0.51a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
OK, I will go without None, zero choice will be sufficient, if I alter
the program a bit...
mdipierro napsal(a):
You should not combine
IS_IN_DB(db, 'table.id', 'table.name', multiple=True)
with
IS_NULL_OR()
because if multiple choices are
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Oh sorry, I just overlooked the initial reply.. :o)
Hans Donner napsal(a):
David, 10 minutes after your original post there was already a reply:
, not MYISAM. Perhaps that is the problem?
On Jul 20, 12:05 pm, David Zejda d...@atlas.cz wrote:
Hello,
my db backend is MySQL 5.0.51a-24 on Linux.
If I try to gently alter already generated table schema, like to rename
SQLField('relation', 'text', requires = \
IS_NULL_OR(IS_IN_DB
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Yes, the problem is connected with dropping the index on interrelated
field. If I try to manually
DROP INDEX field2__idx ON testing4;
or
ALTER TABLE testing4 DROP field2;
i get the error too. I examined the problem more and the result is:
Field
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Massimo, would it be possible to let the DAL to drop foreign keys before
dropping index or field itself if dealing with MySQL?
David
David Zejda napsal(a):
Yes, the problem is connected with dropping the index on interrelated
field. If I try
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I have this code:
from gluon.tools import Mail, Auth, Recaptcha
mail=Mail()
mail.settings.server='mail.mydomain.net:25'
mail.settings.sender='ad...@mydomain.net'
mail.settings.login=None
auth = Auth(globals(), db)
auth.define_tables()
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thanks, it works.. :)
D.
auth.settings.registration_requires_verification = True
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
if I have
IS_NULL_OR(IS_IMAGE(maxsize=(5000,4000), minsize=(50,50),
extensions=('jpeg', 'png', 'gif')))
as a field validator, the form.accepts with no image to upload causes:
File /web2py/gluon/sqlhtml.py, line 802, in accepts
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I have two tables, table book with fields code and name, filled
with values e.g.:
id codename
1 bz Book 1
2 f4r Other book
and the second table with field:
SQLField('book', db.book, requires = \
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello!
Is it possible to restrict or filter choices listed in a select box
generated by SQLFORM for a field referring to other table?
E.g. I have a field person_id with reference to person.id. I wish to
allow only persons, who meet some criteria
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
there is a multiuser web2py site. I'd like to be able to show, who is
online just now. Please, is there a way to drain the information, maybe
from the stored sessions?
Thanks!
David
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Massimo, thanks.
Now, if I try the exposed login controller in my application, I'm
getting ticket with
id,email,name=session.token
TypeError: 'NoneType' object is not iterable
instead of login page being shown.
In CAS.login_url there is a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
There is a table:
db.define_table('country',
SQLField('code'),
SQLField('name'))
I know, I can do:
db.country.insert(code=UK, name=United Kingdom)
But I have values to be inserted in a dictionary:
row = { code:UK, name:United Kingdom }
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Today I evaluated several Python IDEs, with results:
Idle
for me, debugging does not work
Eric4
debugging does not work, breakpoints in models and controllers
are silently passed over
Netbeans/Python
debugging does not work; debugging session
, in rollback
self._connection.rollback()
ProgrammingError: (2014, Commands out of sync; you can't run this
command now)
Do you have any tips how to aviod these errors?
Thanks!
- --
David Zejda
Sbírka na operaci pro pětiletou Vanessu
http://www.tabang.eu
-BEGIN PGP SIGNATURE-
Version
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My application is running on more domains. Users wish to move from one
domain to another, being still signed-in. I used combination of JS and
Ajax to transfer the credentials from sessions between domains, adhering
to security measures of JS which do
.
Try add a db.commit() after each insert/unpdate/form.accepts/
crud.update/crud.select IF you do a select after that.
Do you have any try:...except in your controllers and db queries
inside?
On Nov 8, 2:57 am, David Zejda d...@atlas.cz wrote:
The MySQL error occurs quite often, several
of problem because I did not
reveal any meaningful shape in the error occurencies. At least not yet. :(
D.
mdipierro wrote:
Has anybody else here had a similar problem?
massimo
On Nov 9, 11:29 am, David Zejda d...@atlas.cz wrote:
Hi :)
E.g. now the exception was raised by the web2py internal
-adventure-threading2
David
- --
David Zejda, Open-IT cz
web development services
http://www.o-it.info
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkzgddIACgkQ3oCkkciamVEuRACfUrHv8hKlkFWPmdmFDEzF4Ww4
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
mdipierro wrote:
yes.
On Nov 14, 5:50 pm, David Zejda d...@atlas.cz wrote:
What do you think, would it be good idea to attach web2py process to one
CPU core to avoid overhead related to switching between cores?
Ryan Kelly writes: I just
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Well.. thanks for a very straightforward answer :)
Will you apply this in a next web2py version? Or is it better to leave
it on each web2py user?
David
mdipierro wrote:
yes.
On Nov 14, 5:50 pm, David Zejda d...@atlas.cz wrote:
What do you
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My web2py instance gradually eats memory, during day the consumption
grows up to several gigs, so I have to restart often. According to guppy
most of memory is occupied by gluon.dal.Field and other classes of dal:
Partition of a set of 3231760
Thanks for the all replies!
I do not directly cache DAL objects, but yes, caching may be behind
the leak
through some references between objects. Maybe I'll examine it with
objgraph,
and I agree, it would be nice to have the function at hand in the
admin interface.
Cherrypy anyserver brings no
.
@ron_m: Awesome. Great suggestions!
-tim
On Dec 25, 3:20 pm, David Zejda d...@atlas.cz wrote:
Thanks for the all replies!
I do not directly cache DAL objects, but yes, caching may be behind
the leak
through some references between objects. Maybe I'll examine it with
objgraph,
and I
own classes with
dicts or Storages, but maybe the findings will help somebody else facing
similar leak..
Nice year to all :)
David
- --
David Zejda, Open-IT cz
web development services
http://www.o-it.info
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG
= cache.ram('blahblah', blah_f,time_expire=30)
2011/1/2 David Zejda d...@atlas.cz:
- --
David Zejda, Open-IT cz
web development services
http://www.o-it.info
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
space it takes.
On Jan 3, 4:21 am, David Zejda d...@atlas.cz wrote:
Hi,
nick is not reference field. To make it sure that the issue is not
dependent on the field definition I checked it with as simple Field as
possible:
Field('trustworthiness', 'double', default=0),
defined in my model
the entire
record.
On Jan 3, 12:22 pm, David Zejda d...@atlas.cz wrote:
Dear Massimo,
thank you for the reply, but Michele's advice makes no difference.
I just noticed that even this one leads to the leak:
class Blah():
def __init__(self):
pass
def blah2
' is a constant in
your code and not a variable? Is this the exact code you are running?
On Jan 3, 5:42 pm, David Zejda d...@atlas.cz wrote:
Hello Massimo,
sorry, but I really do not understand. :-|
How do I store whole record if the only thing I'm trying to store is
instance of a dummy class
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Whenever in controller/model is the class declared, the same result.
Michele Comitini wrote:
Try to put the Blah class in the global scope of the controller. Do
you get same result?
- --
David Zejda, Open-IT cz
web development services
http
, David Zejda d...@atlas.cz wrote:
Whenever in controller/model is the class declared, the same result.
Michele Comitini wrote:
Try to put the Blah class in the global scope of the controller. Do
you get same result?
- --
David Zejda, Open-IT cz
web development services
http://www.o-it.info
://code.google.com/p/web2py/issues/detail?id=146
David
- --
David Zejda, Open-IT cz
web development services
http://www.o-it.info
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
for a productive site I wish to touch the default error handler, maybe
using some kind of decorator. IMO it would be good to
1. retain the ticket generation
2. notify admin by e-mail
3. redirect client to a custom error page
I would like to
and in it write:
error_handler = dict(application='error', controller='default',
function='index')
On Sep 10, 8:54 am, David Zejda d...@atlas.cz wrote:
Hello,
for a productive site I wish to touch the default error handler, maybe
using some kind of decorator. IMO it would be good
some help debugging it.
Massimo
On Sep 11, 7:54 am, David Zejda d...@atlas.cz wrote:
Thank you for the help.
I have one problem with the solution - it seems, that if there is custom
error_handler in routes.py specified, the ticket is not being generated.
No file with traceback information
mysql.
How do we figure out the name of the foreign key from the name of the
table/field?
Massimo
On Jul 22, 10:10 am, David Zejda d...@atlas.cz wrote:
Yes, the problem is connected with dropping the index on interrelated
field. If I try to manually
DROP INDEX field2__idx
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I have upload field with IS_IMAGE validator, which allow only gif,jpg.
If I try to upload bmp, it leads to a weird uncaught exception:
Traceback (most recent call last):
File /opt/web2py/gluon/restricted.py, line 176, in restricted
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I know there are several articles and posts related to the subject,
including relevant section in manual cut.
http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf
But I encountered Graham Dumpleton's blog with severe arguments
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
After upgrade to 1.99.7. I started receiving this error:
Traceback (most recent call last):
File /opt/web2py/gluon/restricted.py, line 194, in restricted
in code it raises a RestrictedError containing the traceback. layer is
File
Hello :)
I am experiencing an issue when I try to log-in through http, then
through https behind Apache using WSGI.
Web2py Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
Python 2.7.3: /usr/bin/python (prefix: /usr)
Traceback (most recent call last):
File /opt/web2py/gluon/main.py, line
Thank you, Anthony!
I deploy the app using commandline script which packs the application
sources, uploads them on server and calls a server-side script which
compiles the app.
So, on the server side in the application folder I have standard
directory structure - source files in 'models',
Hi :)
I would like to run one app on more domains and allow users to apply
per-domain specific skins. E.g. default/index.html should be extending
layout_xyz.html for domain xyz.com, but layout_abc.html for domain abc.com.
As covered in the documentation, conditional {{extend}} does not work.
Hi, Anthony,
thank you for explaining the meaning of the 'context' argument. It works
now as expected.
The suggested approach with variable in extend is neater. It works well
in my development environment. But in the production environment I use
web2py behind Apache through WSGI. If I
I see. Thank you for your help!
David
On 22.7.2015 19:16, Anthony wrote:
It has nothing to do with WSGI. Now that I look back at the code, I
see that run_view_in() simply looks for a compiled folder, and if
it exists, it assumes all views are compiled. That means if any part
of the app is
Hi :)
I am having troubles with web2py behind Apache with multiple SSL
virtualhosts, each serving different web2py application and encrypted with
a different letsencrypt SSL key. All are served from the same IP address. I
have only one web2py instance in my setup.
If I set-up up to 3
Hi,
If you can, please list Open-IT cz, s.r.o. (Czech Republic) as well.
Main website is https://www.o-it.info made in Zope. Though it should be
replaced with something fresher. But, IMO, it is not as ugly that it could
not be listed..
We have a plenty of web2py-based projects, such as:
Hi I found it.
There was another host config in my setup with such a redirect:
ServerName domainxx.com
RedirectMatch permanent (.*) http://www.otherdomain.com$1
When I changed it to:
ServerName domainxx.com
RedirectMatch permanent (.*) http://www.otherdomain.com$1
other domains'
Hi :)
Intuitively I would expect that these queries are equivalent ways to match
if boolean_field is not True:
~(db.mytable.boolean_field == True)
(db.mytable.boolean_field != True)
((db.mytable.boolean_field == None) | (db.mytable.boolean_field == False))
But only the last one works as
On Sunday, 11 February 2018 05:52:44 UTC+1, Massimo Di Pierro wrote:
>
> I would expect that too but it is not a web2py issue. It is a database
> issue. web2py simply translate those in
>
Hi Massimo, thank you for explanation!
David
--
Resources:
- http://web2py.com
- http://web2py.com/book
Hi to all,
to start experimenting with py4web in Eclipse/PyDev on Debian Linux I did
the following.
Maybe someone will find it useful.
Debugging is not working yet for me, an advice would be welcome.
1) Set-up the virtual environment for web4py with libraries managed by pip
(to avoid mixing
Hello to all.
I have a web2py with several apps on a production server behind Apache
accessed via wsgihandler. So far, all the apps have been developed for
python2.
To support python3 apps (preferred for new projects), I set-up a separate
web2py directory and adjusted the Apache configs
ports for HTTP and HTTPS, which seems a better solution than
proxying from one Apache instance to the other.
David
On Monday, 11 November 2019 23:42:56 UTC+1, David Zejda wrote:
>
> Hello to all.
>
> I have a web2py with several apps on a production server behind Apache
> accessed
Hi,
I use web2py to serve PWA, service worker for client-side caching and for
proactive loading of contents which are likely to be requested in the next
step.
In routes.py I have root_static = ['favicon.ico', 'robots.txt',
'service_worker.js'].
Per-app specific service worker. The script
I needed SSL with per-domain certificates. Because mod_wsgi-express, though
easy to install, becomes inflexible if virtual hosts settings need to be
adjusted eventually, I switched to a second instance of Apache from the
system-specific packaging. The steps like this:
cd
Hi,
I found out that
SQLFORM.smartgrid(db.table_name, represent_none="") with a table table_name
containing a field with date datatype throws the exception:
File "/opt/web2py3/gluon/packages/dal/pydal/validators.py", line 2335, in
formatter
year = value.year
AttributeError: 'str' object has
82 matches
Mail list logo