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
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)
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
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
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
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&
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(
Thanks Massimo for your update.
Kr,
Joel
On 05/07/2016 15:37, Massimo Di Pierro wrote:
Your code works for me when using
curl "http://jcouelier <http://jcouelier/>%40gmail.com
<http://40gmail.com/>:@domain:port/URL"
but now when using the browser. So I think the b
Hello Massimo,
Just a quick question, have you got the confirmation if sending user +
password directly in the URL is working on basic auth mode?
I have added the following on my controller :
if request.function == 'ping':
auth.settings.allow_basic_login = True
@auth.requires_login()
def
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
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
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
grating to web2py (other platforms are on the
list, but I'm most productive with Python and like what I've seen of
web2py).
My question:
I will probably have to migrate the API in pieces. Does anyone have
experience running a Tomcat/Java application and web2py side-by-side? Any
caveats?
I have a very simple form processing page in my controller:
def new():
form = SQLFORM.factory(
Field('f_name', label='Your name', requires=IS_NOT_EMPTY()),
)
if form.process().accepted:
db.table.insert(**form.vars)
response.flash = 'form accepted'
elif f
I want a method to update the database record behind a model, and I thought
something like this might work.
class MyModel:
def db_update(self, field_name, value):
self.db(self.db.t_empire.id==self.record.id).update(field_name=value)
Apparently not. The field_name cannot be a string.
"
My concern is that the aplug.jar is not a jar file i have created but a
dlink jar file.
So, is there any possibility to web2py to use "external" jar file not
located on /static folder but located on codeBase location?
Any answer or advice will be greatly appreciated.
T
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
We do use MEMDB with the memcache client for sessions. Do you know when this
bug was introduced? We are still running 2.5.1 in production, but were looking
to upgrade soon.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
Does this only apply to GAE use? We use memcache for sessions but not GAE.
Thanks,
--Joel.
On Wednesday, November 13, 2013 6:19:14 PM UTC-6, Massimo Di Pierro wrote:
>
> A serious issue has been reported on web2y-developers. The issue has to do
> with the memdb module. You are using
That's too bad. Is there a reason for it, or just haven't found any use
for it yet?
On Wednesday, November 13, 2013 10:49:43 AM UTC-6, Niphlod wrote:
>
> nice shot, but scheduler isn't supported in MEMDB.
>
> On Wednesday, November 13, 2013 6:25:40 AM UTC+1, Joel
che.memcache = gluon.contrib.memcache.MemcacheClient(
request,memcache_servers
)
current.cache = cache db = MEMDB(cache.memcache)
from gluon.scheduler import Scheduler
scheduler = Scheduler(db)
Thanks in advance.
Cheers,
--Joel.
--
Resources:
- http://web2py.com
- http://web2py.com
Submitted as #1685
On Thursday, September 19, 2013 12:47:09 PM UTC-6, Massimo Di Pierro wrote:
>
> Please open a ticket about this.
>
>
> On Thursday, 19 September 2013 13:07:38 UTC-5, Joel Rathgaber wrote:
>>
>> We are putting things in the session, so it shouldn'
n the globals.py and could not see
any place that the cookies were assigned in the response object (as there
was in the 2.5 version of globals.py).
Thanks!
--Joel.
On Thursday, September 19, 2013 10:39:56 AM UTC-6, Massimo Di Pierro wrote:
>
> If the session is empty it is not saved. I
Hey all,
I've noticed that in the 2.5 and prior releases that the session id cookie
was sent back to the client in every response, and it seems like in 2.6 it
doesn't do this anymore. Is this by design? If so, what's the reasoning?
Thanks!
--Joel.
--
Resources:
- http://we
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
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 noob here: I have a long-running Scheduler task that is updating a
record-count. The record count is displayed in a view.
How would one update the view when the Scheduler updates the record count?
--
---
You received this message because you are subscribed to the Google Groups
"web2py-
Hi,
How can I use options.py with tornado anyserver?
My options.py configuration uses both of http:80 and https:443 at the same
time.
options.py
ip = '0.0.0.0'
port = 80
interfaces = [('0.0.0.0', 80), ('0.0.0.0', 443, 'server.key', 'server.crt')]
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
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
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('\://([^:@]
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
you describe is true. With sort=False
though, sort order is not alphabetical and what you describe does not work
since you can't know in what order models are run.
/Joel
Den måndagen den 10:e december 2012 kl. 17:10:43 UTC+1 skrev Anthony:
>
> I've been testing the way you desc
ging web2py? I am aware that just setting sort to
true in the listdir-call will fix my issue but I would like to be able to
update web2py without having to make that change each time, if possible.
Best regards,
Joel
Den fredagen den 23:e november 2012 kl. 05:28:22 UTC+1 skrev Anthony:
>
&
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
startswith function (
db.mytable.myfield.contains('value')) I get an error. Is there any way I
can get similar behaviour to contains but with startswith without moding
web2py?
Best regards,
Joel
--
that, I haven't been able to find any mention if the fix
(mentioned in last message in above thread) was ever implemented.
Can I somehow get subfolders in my models catalogue to be executed without
moding compileapp myself?
Best regards,
Joel
--
I was calling auth.define_tables() after defining auth_user manually.
My mistake.
On Saturday, September 8, 2012 1:56:37 PM UTC-4, Joel Carrier wrote:
>
> Hmmm... i never call auth.define_tables I guess because I wanted to
> customize the auth_user table.
> And yet the following ta
Good eye Niphlod!
On Saturday, September 8, 2012 1:59:11 PM UTC-4, Joel Carrier wrote:
>
>
> Ha, as soon as I pasted this snippet I realized that and was looking to
> modify.
> When developing I was working off the trunk and having this problem.
> For some reason I thought may
ompatible.
> Someone here is:
> - posting the wrong code
> - use the wrong web2py version
> - telling lies :P
>
> @Joel: jokes apart, can you please verify ?
>
> On Saturday, September 8, 2012 7:48:14 PM UTC+2, Massimo Di Pierro wrote:
>>
>> Supposed to work any upd
+'xxx'))
> >>> auth.enable_record_versioning(db)
> >>> print db.thing(2).modified_on
> 2012-09-08 09:22:28
> >>> db.thing(2).update_record(name='test4')
> >>> print db.thing(2).modified_on
> 2012-09-08 12:49:01
>
> Massimo
>
uth_user.
registration_id)
db.auth_user.email.requires = (
IS_EMAIL(error_message=auth.messages.invalid_email),
IS_NOT_IN_DB(db, db.auth_user.email),
IS_UPPER()
)
and in models directory i also have a z.py
auth.enable_record_versioning(db)
Do I have to update my entities using SQ
I want to maintain an audit history of all my objects.
So near the beginning of my model definition I have
db._common_fields.append(auth.signature)
and at the very end I have
auth.enable_record_versioning(db)
The problem I am having is that when I pull up all the records representing
the hist
L
> 6.2, 3.1GHz quad-core Xeon, 8GB RAM, Apache with mod_wsgi) completed 3061
> requests with a mean 0.490 seconds per request. Beefier than what AppFog
> gave me? Sure, but not enough to explain handling 22x the requests, with
> 1/22nd the response time.
>
> * The AppFog mean request fulfillment numbers varied by as much as two
> seconds over the several times I ran the tests. That sort of
> unpredictability worries me.
>
>
>
> On Thursday, July 26, 2012 9:50:01 PM UTC-4, Joel Carrier wrote:
>>
>> Has anyone tried running web2py on appfog ( www.appfog.com ) and cares
>> to comment on their experience?
>
>
--
Has anyone tried running web2py on appfog ( www.appfog.com ) and cares to
comment on their experience?
--
Hi Nick Name,
Did you ever find a solution that met all your requirements? What you've
described is exactly what I am facing now.
Joel
On Friday, May 6, 2011 6:18:49 PM UTC-4, nick name wrote:
>
> My use of web2py requires an audit trail for (essentially) all database
&g
Great!
Thank you.
On Tuesday, June 12, 2012 10:17:46 PM UTC+9, Massimo Di Pierro wrote:
>
> The official web2py book is now free for everybody:
>
> https://dl.dropbox.com/u/18065445/web2py/web2py_manual_4th.1.pdf
>
> Massimo
>
--
Thank you so much for your reply. That took care of everything.
Thank you very much for the tips. I know the code is very rough. I had just
started on it when I ran into this problem, and I'm still fairly new to
web2py and python.
Thanks again for your help.
Joel Robinson
On Thu
in case no rows are found? Also, you can instead do:
>
> row = db(db.invent.partnum == request.vars.partnum).select().first()
> if row:
> etc.
>
> .first() returns the first row or None if there are no records.
>
> Anthony
>
> On Thursday, June 7, 2012 10:49:54 AM UT
=LAMP-4
I will get the correct web page, but when I change a value and hit the
submit button I just get sent to
a page that says "None". If I reload the page the values are unchanged.
Nothing was updated.
Joel Robinson
On Thursday, June 7, 2012 9:33:57 AM UTC-5, Anthony wrote:
>
&
Thanks for the reply. I tried your sugestion but am still getting an error,
though a different one:
Traceback (most recent call last):
File "/home/joel/Source/web2py/gluon/restricted.py", line 205, in restricted
exec ccode in environment
File "/home/joel/Source/web2
ecord = crud.update(db.invent, row.id)
return dict(record=record)
initialy it would work fine it would run the query and pull up the correct
record but
if I tried to update the record I would get the folling error:
Traceback (most recent call last):
File "/home/joel/Source/we
Same here. Is it a bug?
On Friday, March 2, 2012 10:49:57 AM UTC+9, tomt wrote:
>
> Hi,
>
> I just installed 1.99.5. Clicking on the database administration
> button doesn't bring up the usual database administration form.
> Instead it brings up http://127.0.0.1:8000/admin/default/site. (The
d--in my
opinion. I think this should seriously be considered.
All being said, I will continue to use my trashcan icon until a respectable
change has been made.
On Sat, Nov 20, 2010 at 8:49 AM, Branko Vukelic wrote:
> On Sat, Nov 20, 2010 at 1:58 PM, Joel Clay wrote:
> > What? R
>
>
> "* The 'redness' of the X icon would fall into the 5th category, but
> there is no good solution, so it's a wontfix, again. Proposed solution
> all break 6 or are similar to the current solution."
>
What? Really. I've seen quite a number of good solutions run through
this topic.
Obviously mo
On Sat, Nov 20, 2010 at 3:16 AM, Branko Vukelic wrote:
> On Sat, Nov 20, 2010 at 9:45 AM, annet wrote:
> > I like the new admin interface, however, I had t re-open an older
> > version of web2py to figure out the meaning of the black and yellow
> > circle (test, my first association was 'beware
, 9:06 pm, Joel Clay wrote:
> > How about we turn the red X into a checkbox (think Gmail) You check the
> box
> > and at the top there are links to perform actions (in this case delete).
> In
> > my opinion, this kills two birds with one stone -- it increases ease of
> &g
It's not that there is a problem with the red X suggesting that it is to
delete the file, it's just all of those red X's in a line on the page seem
to be overwhelming. Most of us associate red with negative.
I'd like to suggest another fix:
How about we turn the red X into a checkbox (think Gmail
Glad you guys liked the idea, for those interested, here is the icon i used.
http://drise.servehttp.com/Uploads/images/delete_icon.png
Joel.
On Fri, Nov 19, 2010 at 1:43 PM, Branko Vukelic wrote:
> 2010/11/19 António Ramos :
> > Let me say that the admin page is nice but as a L
On Thu, Feb 5, 2009 at 4:01 PM, Markus Gritsch wrote:
> Hi,
>
> I have configured my Firefix to use Verdana to render pages. The new
> style of the web2py homepage breaks with this wider font. See
> attachments.
Is that not just breaking the CSS that's already applied?
>
>
> Kind regards,
not resized to a standard size but it still prints out very nicely
> for me.
>
> -tim
>
> Joel Merrick wrote:
> > Yea, I was thinking along those lines, but wondered if it was some
> > kind of flag within the PDF itself (for the crop marks)
> >
> > The r
Presumably web2py is only listening on 127.0.0.1, hence it will only serve
pages requested from your localhost
I'm certain there's an option to listen on other IP's (can't remember of the
top of my head), alternatively you could put a reverse proxy in front of it.
On Thu, Jan 22, 2009 at 1:53 PM
nt it
> > out.
> >
> > Unfortunately there's printer crop marks on all the pages.. is there
> > any way to remove them do you know and scale the pages to A4?
> >
> > t.i.a.
> > Joel
> > >
> >
>
> --
> Timothy Farrell
> Computer
teers, tracking camps effectively between
> Government groups, the civil society (NGOs) and the victims
> themselves.
> http://sahana.lk/overview
>
What an awesome and worth cause!
I'll help out in any way that I can!
Joel
--
$ echo "kpfmAdpoofdufevq/dp/vl
itory
>
> or
>
> orderby=~db.territory_event.date.month()
>
> etc.
>
> Massimo
>
> On Dec 28, 9:50 pm, Joel wrote:
>
> > i'm doing something like this:
>
> > events = db(db.territory_event.territory==territory.id).select
> > (db.territory_e
i'm doing something like this:
events = db(db.territory_event.territory==territory.id).select
(db.territory_event.ALL,orderby='-date')
db.territory_event.date is of type 'date'
for some reason, it seems like
2020-01-28 is greater than 2008-12-28
but 2008-12-29 is not greater than 2008-12-28
irc.freenode.net #web2py
none of this web based pointy clicky stuff ;)
On Fri, Dec 19, 2008 at 11:45 AM, mmstud wrote:
>
> By the way, have you thought to open / join irc channel for web2py
> discussion? #web2py dozens of small questions could be easily and fast
> answered there, what do you th
Really enjoying the book, but I feel the printer crop marks are really
annoying.
Is there any way to remove them?
--
$ echo "kpfmAdpoofdufevq/dp/vl" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
68 matches
Mail list logo