Creating a SQLFORM.factory() from multiple tables, or a combination of
tables and fields, now breaks, because the underlying logic assumes the
tables are fields:
form = SQLFORM.factory(idb.catering, idb.catering_diet)
File "/home/www-data/internal-apps/gluon/sqlhtml.py", line 1922, in factory
Actually, this should be simple enough that I can post a fix.
On Friday, 21 July 2017 09:35:34 UTC+1, tim.n...@conted.ox.ac.uk wrote:
>
> Creating a SQLFORM.factory() from tables, or a combination of tables and
> fields, now breaks, because the underlying logic assumes the tables are
> fields:
>
any help ?
2017-07-20 22:45 GMT+01:00 António Ramos :
> hello i tested this simple code outside web2py
>
> class a():
> def a1(self):
> temp=getattr(eval("b")(), "b1")('testing result')
> return temp
>
> class b():
> def b1(self,param):
>* s=somevar2.somesubvar1*
>
Hi, do you know if this is the same when i use primary keys of legacy
tables - doesn't seem to be working when i change my tables to primary key.
thanks
On Wed, Jul 19, 2017 at 4:10 PM, Jim S wrote:
> We were all there once. Glad I was able to help. Part of the beauty of
> web2py is the commun
Yes I'm pretty sure it's a RAM issue, 48 free MB is way too low. You easily
start having to use virtual memory with a couple of requests.
To give you an idea, on a similar setup but a much better machine, I have a
much much more complex page than yours appears to be, with quite a lot of
aj
Do you have the following in your module:
from gluon import current
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message be
yes i have
from gluon import current
in my wf_validates.py
2017-07-21 13:39 GMT+01:00 Anthony :
> Do you have the following in your module:
>
> from gluon import current
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py
this is my real code in wf_validates.py
from gluon import current
class Validate(object):
def status(self,table,field,row,db):
wf=db.workflows(id=row[table]["workflow"])["workflow"]
if wf in ["Ficheiros","Load","Pessoa"]:
cb=getattr(eval("Ficheiros")(), "status"+"_"+"Draft")('xx','db')
return cb
I want to clean up a table daily using schedule at midnight, I don't want
scheduler to poll too often to waste unnecessary resource. how should I do
it?
1) give heartbeat a large number in scheduler = Scheduler(db_sch,
heartbeat=7200)?
2) scheduler.queue_task(clear_curr_exch_cache, period=86400,
What is the traceback?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-
There is no traceback. the record is returned like this if i remove
session=current.session
, 'titleenter': 'Review', 'title': 'Draft',
'titleaction': 'Draft', 'entities_extra': , 'entities': , 'rgb': '#00c0ef', 'rules':
, 'details': 'Person', 'id': 8L,* 'isavailable': True*,
'icon': 'fa-user', '
I'm assuming you're talking about a primary key made up of multiple
fields. Is that correct.
I've never done that, but I don't see how it would change anything other
than the 'left' setup.
-Jim
On Fri, Jul 21, 2017 at 5:54 AM, 'Matthew J Watts' via web2py-users <
web2py@googlegroups.com> wrote:
there is no *"isavailable"*
Yes there is. Did you paste the wrong result? 'isavailable' is True in
the second result set too.
-Jim
On Friday, July 21, 2017 at 9:46:26 AM UTC-5, Ramos wrote:
>
> There is no traceback. the record is returned like this if i remove
> session=current.session
Only if you're using conditional models.
-Jim
On Thursday, July 20, 2017 at 6:00:45 PM UTC-5, Alex Glaros wrote:
>
> any performance advantage to moving controller files out of default.py
> into their own file?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- htt
For this simple test
db.define_table('tab1',
Field('name'),
auth.signature
)
i got to admin and create a record
Initially the record is saved with modified_on as 2017-07-21 16:21:36
then via admin i edit the record and change name field and save.
The modified_on is still with 2017-07-21 16:21:3
Hello,
I have created a form with sqlform.grid and added an additional
sqlform.factory to the same form.
The sqlform.grid has a selectable function where I want to pass the value
of sqlform.factory fields.
Please suggest how this can be done.
Regards,
Amit
--
Resources:
- http://web2py.com
-
Maybe my question is wrong because of some background that I'm not seeing.
Due to the structure of my app, I use @cache.action like this in all my
controller functions:
@cache.action(cache_model=CACHE.model, time_expire=CACHE.time_expire,
session=CACHE.session, vars=CACHE.vars, public=CACHE.publ
Ok thanks for your help Jim, i was getting confused - i introudced a bug
into my app but all working fine now i moved all the code to a fresh app
On Fri, Jul 21, 2017 at 3:51 PM, Jim Steil wrote:
> I'm assuming you're talking about a primary key made up of multiple
> fields. Is that correct.
>
I've certainly done that in the past as well.
Have a great weekend!
-Jim
On Fri, Jul 21, 2017 at 1:32 PM, 'Matthew J Watts' via web2py-users <
web2py@googlegroups.com> wrote:
> Ok thanks for your help Jim, i was getting confused - i introudced a bug
> into my app but all working fine now i move
On Friday, July 21, 2017 at 6:27:50 AM UTC-7, Rudy wrote:
>
> I want to clean up a table daily using schedule at midnight, I don't want
> scheduler to poll too often to waste unnecessary resource. how should I do
> it?
>
I'm pretty sure Niphlod will say (and has said), "Why bother?" -- the
sche
It seems that you are right, I set up a virtual machine with 4gb ram only
for the database and I ran the code along with redis on my laptop with 16gb
ram and my times now are nearly the 600ms. I think it is good enough.
Having some components that don't perform selects rendering only a simple
h
On Friday, July 21, 2017 at 12:29:47 PM UTC-7, Dave S wrote:
>
> On Friday, July 21, 2017 at 6:27:50 AM UTC-7, Rudy wrote:
>
>>
>> Another question: how to i associate tasks to a specific group? I seem to
>> miss this in the doc
>>
>>
> I'd take a look at the scheduler tests -- Niphlod's default
You are right, maybe a development server and a production server could
have different .table files but share the same model file. There is no
problem for us to keep one of our versions with fake_migrate=True. Can we
switch who is using migrate=True? What happens if both of us use
migrate=True
Yes. I just tested with 2.15.2 and all works perfectly as expected.
-- Joe
On Thursday, July 20, 2017 at 2:58:08 PM UTC-7, Massimo Di Pierro wrote:
>
> Can you confirm all is good now with 2.15.2?
> Thanks to you and Leonel for looking into this so quickly.
>
> On Sunday, 16 July 2017 21:34:40
In appadmin, I think all fields are made writable, which means the modified_on
field should appear in the form - is that what you see? If so, the old value
will simply be submitted with the form, so the value will not be updated
(unless you manually change it).
The automatic update will only ha
Great and simple.
Thank you Anthony
2017-07-21 22:19 GMT+01:00 Anthony :
> In appadmin, I think all fields are made writable, which means the
> modified_on field should appear in the form - is that what you see? If so,
> the old value will simply be submitted with the form, so the value will not
I'm using a 32GB quad core server, which is way **way** more than I need at
the moment, but soyoustart is ridiculously cheap and I have this stupid
idea that before scaling horizontally you scale vertically as much as
possible.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Docu
There are lots of easy ways to optimize for scaling up. Spend your energy
on end user functionality until you run into issues.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
@leonel, might i know what do you mean with scaling horizontally and
scaling vertically?
thanks and best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Rep
What I mean is that nowadays it's not that expensive to have a 256GB server
with 20 cores. So instead of having a load balancer, a lot of machines
running web and application servers, a lot of other machines running
databases, etc. You can start with a small server and keep improving it for
qui
I've searched through the discussion archive before posting this question.
There were few threads here and there but nothing definitive.
Please share your experience with using the web2py docker image. Can you
recommend a docker image(s) that you've been using in production?
Thanks,
CD
--
Res
31 matches
Mail list logo