[web2py:37572] compile app to bytecode using commandline

2009-12-19 Thread David Zejda
, 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

[web2py] Re: MySQL server has gone away

2010-03-23 Thread David Zejda
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

[web2py] Re: MySQL server has gone away

2010-03-26 Thread David Zejda
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

[web2py] pass arguments to a function used by cache

2010-03-26 Thread David Zejda
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 --

[web2py] cache language files

2010-03-26 Thread David Zejda
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

[web2py] Re: cache language files

2010-03-27 Thread David Zejda
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

[web2py] Re: Cache - how to prevent session object to be cached?

2010-03-28 Thread David Zejda
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

[web2py] Re: Cache - how to prevent session object to be cached?

2010-03-30 Thread David Zejda
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():

[web2py] Re: Cache - how to prevent session object to be cached?

2010-03-31 Thread David Zejda
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

[web2py] Re: Cache - how to prevent session object to be cached?

2010-04-03 Thread David Zejda
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

[web2py] Memory usage inspection

2010-04-09 Thread David Zejda
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

[web2py] Re: Memory usage inspection

2010-04-10 Thread David Zejda
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

[web2py] web2py Mail tool - unwanted encoding of 'to' header

2010-05-05 Thread David Zejda
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:

[web2py] Re: web2py Mail tool - unwanted encoding of 'to' header

2010-05-05 Thread David Zejda
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.

[web2py] Web2py crashing

2010-05-07 Thread David Zejda
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. #!

[web2py] Re: Web2py crashing

2010-05-07 Thread David Zejda
...@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

[web2py] Re: Web2py crashing

2010-05-07 Thread David Zejda
: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

[web2py] MultipleOptionsWidget do not work with multiple=True fields (patch)

2010-10-11 Thread David Zejda
-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):

[web2py:24107] Re: IDE with debugging support for web2py

2009-06-13 Thread David Zejda
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

[web2py:24805] simple wysiwyg editor for SQLFORM

2009-06-23 Thread David Zejda
-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

[web2py:24811] Re: simple wysiwyg editor for SQLFORM

2009-06-23 Thread David Zejda
-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

[web2py:24883] Re: IDE with debugging support for web2py

2009-06-24 Thread David Zejda
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

[web2py:25576] override default model values in SQLFORM

2009-07-03 Thread David Zejda
-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

[web2py:26124] Re: override default model values in SQLFORM

2009-07-10 Thread David Zejda
-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

[web2py:26952] MySQL - OperationalError: Error on rename (errno: 150)

2009-07-20 Thread David Zejda
-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',

[web2py:26953] SQLForm and IS_NULL_OR(IS_IN_DB( ... multiple=True))

2009-07-20 Thread David Zejda
-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

[web2py:26983] Re: MySQL - OperationalError: Error on rename (errno: 150)

2009-07-20 Thread David Zejda
-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

[web2py:26985] Re: SQLForm and IS_NULL_OR(IS_IN_DB( ... multiple=True))

2009-07-20 Thread David Zejda
-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

[web2py:26987] Re: override default model values in SQLFORM

2009-07-20 Thread David Zejda
-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:

[web2py:27038] Re: MySQL - OperationalError: Error on rename (errno: 150)

2009-07-21 Thread David Zejda
, 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

[web2py:27154] Re: MySQL - OperationalError: Error on rename (errno: 150)

2009-07-22 Thread David Zejda
-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

[web2py:27311] Re: MySQL - OperationalError: Error on rename (errno: 150)

2009-07-24 Thread David Zejda
-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

[web2py:27562] Auth: mail validation

2009-07-29 Thread David Zejda
-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()

[web2py:27597] Re: Auth: mail validation

2009-07-30 Thread David Zejda
-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

[web2py:27648] IS_NULL_OR(IS_IMAGE causes AttributeError

2009-07-30 Thread David Zejda
-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

[web2py:27926] chage the sort order for generated selectbox

2009-08-04 Thread David Zejda
-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 = \

[web2py:28178] filtering values offered in selectbox

2009-08-07 Thread David Zejda
-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

[web2py:28605] sessions - how to find who is online

2009-08-14 Thread David Zejda
-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

[web2py:20572] Re: Using local CAS provider with app in the same web2py instance

2009-04-26 Thread David Zejda
-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

[web2py:20623] insert() values provided in a dictionary

2009-04-27 Thread David Zejda
-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 }

[web2py:20892] IDE with debugging support for web2py

2009-04-30 Thread David Zejda
-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

[web2py] ProgrammingError: (2014, Commands out of sync; you can't run this command now)

2010-11-08 Thread David Zejda
, 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

[web2py] Authentication over domains

2010-11-08 Thread David Zejda
-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

Re: [web2py] Re: ProgrammingError: (2014, Commands out of sync; you can't run this command now)

2010-11-09 Thread David Zejda
. 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

Re: [web2py] Re: ProgrammingError: (2014, Commands out of sync; you can't run this command now)

2010-11-10 Thread David Zejda
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

[web2py] Stick web2py to one CPU?

2010-11-14 Thread David Zejda
-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

Re: [web2py] Re: Stick web2py to one CPU?

2010-11-15 Thread David Zejda
-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

Re: [web2py] Re: Stick web2py to one CPU?

2010-11-15 Thread David Zejda
-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

[web2py] memory leak - model remains in memory after requests

2010-12-24 Thread David Zejda
-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

[web2py] Re: memory leak - model remains in memory after requests

2010-12-25 Thread David Zejda
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

Re: [web2py] Re: memory leak - model remains in memory after requests

2010-12-27 Thread David Zejda
. @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

[web2py] Memory leak - followup

2011-01-02 Thread David Zejda
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

Re: [web2py] Re: Memory leak - followup

2011-01-03 Thread David Zejda
= 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

Re: [web2py] Re: Memory leak - followup

2011-01-03 Thread David Zejda
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

Re: [web2py] Re: Memory leak - followup

2011-01-03 Thread David Zejda
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

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread David Zejda
' 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

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread David Zejda
-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

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread David Zejda
, 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

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread David Zejda
://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

[web2py:30609] ticket tracking

2009-09-10 Thread David Zejda
-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

[web2py:30711] Re: ticket tracking

2009-09-11 Thread David Zejda
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

[web2py:31133] Re: ticket tracking

2009-09-16 Thread David Zejda
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

[web2py:31137] Re: MySQL - OperationalError: Error on rename (errno: 150)

2009-09-16 Thread David Zejda
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

[web2py:31677] TypeError not indexable request.vars on SQLFORM.accepts()

2009-09-25 Thread David Zejda
-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

[web2py:33081] web2py behind apache

2009-10-17 Thread David Zejda
-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

[web2py] ImportError: cannot import name PickleableStorage after upgrading to 1.99.7

2012-04-12 Thread David Zejda
-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

[web2py] Apache virtual hosts http and https correct WSGI setup?

2014-06-16 Thread David Zejda
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

Re: [web2py] response.render in controller raises NameError

2015-07-22 Thread David Zejda
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',

[web2py] response.render in controller raises NameError

2015-07-21 Thread David Zejda
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.

Re: [web2py] response.render in controller raises NameError

2015-07-22 Thread David Zejda
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

Re: [web2py] response.render in controller raises NameError

2015-07-25 Thread David Zejda
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

[web2py] web2py behind Apache with virtualhosts and SSL (SNI) leads to SSL_ERROR_RX_RECORD_TOO_LONG

2018-02-02 Thread David Zejda
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

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2018-02-02 Thread David Zejda
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:

[web2py] Re: web2py behind Apache with virtualhosts and SSL (SNI) leads to SSL_ERROR_RX_RECORD_TOO_LONG

2018-02-03 Thread David Zejda
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'

[web2py] query to match if boolean field is not True

2018-02-06 Thread David Zejda
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

[web2py] Re: query to match if boolean field is not True

2018-02-12 Thread David Zejda
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

[web2py] py4web and Eclipse/PyDev

2019-11-13 Thread David Zejda
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

[web2py] how to specify python3 for wsgihandler

2019-11-11 Thread David Zejda
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

[web2py] Re: how to specify python3 for wsgihandler

2019-11-22 Thread David Zejda
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

[web2py] Re: Progressive Web Apps

2019-12-04 Thread David Zejda
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

[web2py] Re: how to specify python3 for wsgihandler

2019-12-04 Thread David Zejda
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

[web2py] web2py represent_none in SQLFORM.smartgrid in combination with date field throws exception

2020-02-25 Thread David Zejda
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