[web2py] hide_password seems to hide only the username

2013-01-11 Thread Joel Samuelsson
Not sure if this is the right place to submit a "bug report" but here it goes: If you print a DAL object (using a MySQL adapter, at least) the username is hidden but the password is still visible. To me it looks like the regexp is at fault (gluon/dal.py): REGEX_PASSWORD = re.compile('\://([^:@]

[web2py] Re: hide_password seems to hide only the username

2013-01-11 Thread Joel Samuelsson
Using version 2.3.2 (stable) by the way. Den fredagen den 11:e januari 2013 kl. 10:59:24 UTC+1 skrev Joel Samuelsson: > > Not sure if this is the right place to submit a "bug report" but here it > goes: > > If you print a DAL object (using a MySQL adapter, at least) the

[web2py] Pickling web2py object

2013-01-11 Thread Joel Samuelsson
Hi, I am using one of my web2py models outside of web2py, in a script intended to be run from command line. I am importing the models of web2py (to get access to my database definitions and other models) using this code-snippet: def _importWeb2py(): rundir = os.getcwd() WEB2PY_PATH = rund

[web2py] Subfolders in models

2012-11-22 Thread Joel Samuelsson
Hi, I would like to have a subfolder structure in my models folder. I am aware that subfolders are only executed upon request from the user. I saw this thread however: https://groups.google.com/forum/?fromgroups=#!searchin/web2py/models$20subfolders/web2py/o8Ya4ZqNhLk/eoeLK7_45Z4J But after that

[web2py] Multiple like clauses

2012-11-26 Thread Joel Samuelsson
I have a function which takes a list of prefixes the data from a select can start with. The list is of unknown size. I found that the contains function (db.mytable.myfield.contains('value')) can take a list instead of 'value'. When I try this with the startswith function ( db.mytable.myfield.con

[web2py] Re: Multiple like clauses

2012-12-06 Thread Joel Samuelsson
uld use the SQL "in" syntax (web2py calls it "belongs") which does take a > list or even a subquery as its argument. > > -- Joe B. > > On Monday, November 26, 2012 3:58:29 AM UTC-8, Joel Samuelsson wrote: >> >> I have a function which takes a list of

[web2py] Re: Subfolders in models

2012-12-10 Thread Joel Samuelsson
ll models in all subfolders, somewhere in the > first model file, just do: > > response.models_to_run = ['.*'] > > It is checked after each model is executed, so it can be changed > dynamically from one model file to another. Also, note that when specifying > f

[web2py] Re: Subfolders in models

2012-12-11 Thread Joel Samuelsson
I'm not sure if we're using the same web2py version. I am using the current stable release (2.2.1). The call to listdir looks like this (just downloaded a fresh copy and double-checked): models = listdir(path, '^\w+\.py$', 0, sort=False) I.e. sort=False. Otherwise, what you describe is true. With

[web2py] Re: Subfolders in models

2012-12-14 Thread Joel Samuelsson
Glad to help! You do excellent work. Thanks! Den tisdagen den 11:e december 2012 kl. 15:25:21 UTC+1 skrev Massimo Di Pierro: > > How did that get in there? Fixed in trunk. Thanks Joel for reporting this. > > On Tuesday, 11 December 2012 02:51:15 UTC-6, Joel Samuelsson wrote: >&g

[web2py] MemoryError using sqlite

2013-07-10 Thread Joel Samuelsson
the blob into memory shouldn't be a problem. Are there any other limits on memory usage I need to be aware of? Best regards, Joel Samuelsson -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and sto

[web2py] Re: Subfolders in models

2013-09-17 Thread Joel Samuelsson
In version 2.6.3, sort=False is still there. Unsure if the way it's supposed to be used has changed. Got the same bug as before when I updated. Den fredagen den 14:e december 2012 kl. 09:39:24 UTC+1 skrev Joel Samuelsson: > > Glad to help! You do excellent work. Thanks! > > De

Re: [web2py] Re: beginner questions about REST

2013-11-22 Thread Joel Samuelsson
Is this in the stable version yet? I am having the same issue and updating to the latest stable doesn't help. If not, is there a small fix I can use in the meantime? Best regards, Joel Samuelsson Den onsdagen den 18:e september 2013 kl. 14:56:50 UTC+2 skrev Dimid Korovev: > > Ti

[web2py] JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Joel Samuelsson
Hi, I'd like to respond with a complex data structure when raising a HTTP 409 Conflict as response to a restful request but I can't seem to figure out how. If possible, I'd like to reuse as much as possible from built-in functions in web2py. The best idea I've gotten so far is something like t

[web2py] Re: JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Joel Samuelsson
4 PM UTC+2, Marlysson Silva wrote: >> >> The web2py would use generic views depending of extension of url. >> Is it? >> >> Em terça-feira, 28 de junho de 2016 11:31:48 UTC-3, Joel Samuelsson >> escreveu: >>> >>> Hi, >>> >>> I&#

[web2py] Insert ignored when using time

2016-03-19 Thread Joel Samuelsson
Hi, I have a table like this: db.define_table('speed', Field('speed', 'integer'), Field('startTime', 'time'), Field('stopTime', 'time'), migrate=False, fake_migrate=True ) The database is a MySQL db. speed is of type int, startTime is of type time, stopTime is of type time, The table was created

[web2py] SQL warning

2019-05-15 Thread Joel Samuelsson
Hi, I'm running web2py in a docker container to run some tests against a fresh database. I get this warning that I'd like to get rid of: /var/www/DataCollectionManager/web2py/gluon/dal.py:1961: Warning: Incorrect integer value: '' for column 'registration_id' at row 1 ret = self.cursor.execute(

[web2py] Re: SQL warning

2019-05-16 Thread Joel Samuelsson
It is not my table but something builtin I'm guessing. I have no column with name registration_id. Den onsdag 15 maj 2019 kl. 18:31:10 UTC+2 skrev Dave S: > > > > On Wednesday, May 15, 2019 at 5:59:06 AM UTC-7, Joel Samuelsson wrote: >> >> Hi, >> >> I&

[web2py] Re: SQL warning

2019-05-17 Thread Joel Samuelsson
gt; > On Thursday, May 16, 2019 at 2:26:21 AM UTC-7, Joel Samuelsson wrote: >> >> It is not my table but something builtin I'm guessing. I have no column >> with name registration_id. >> > > That name sounds like it is from Auth (auth_user, probably). Please

[web2py] Keeping objects between requests

2020-04-05 Thread Joel Samuelsson
I'm using cassandra as a database with web2py and would like to keep the cassandra session between requests to reduce session recreation and lower latencies. Is this a bad idea? And how would I do it? Any tips appriciated! -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Re: Keeping objects between requests

2020-04-07 Thread Joel Samuelsson
Did this in the top of a controller: from gluon import current try: if current.ts_db is not None: Databases.setTSDB(current.ts_db) except AttributeError: current.ts_db = Databases.setTSDB() Databases is a model and setTSDB looks liks this: @staticmethod def setTSDB(db = None): if db is N

[web2py] Re: Keeping objects between requests

2020-04-07 Thread Joel Samuelsson
Thanks, this works. Is that how people usually do to keep db connections alive? Den tisdag 7 april 2020 kl. 12:30:54 UTC+2 skrev Val K: > > Ups, sorry current is thread local and renew per request, use regular > mudule -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] MySQL cache issues

2020-04-15 Thread Joel Samuelsson
Got help earlier with keeping my database connections alive between requests: https://groups.google.com/forum/#!topic/web2py/QraWtFvlqf8 I put my databases in a module like this: class Databases(): _td_db = None @staticmethod def getTDDB(): dbCreated = False if Databases._td_db