Hi, has anyone successfully set up ELB with web2py? I've been trying and
struggling to get very far.
I made it as far as 'web2py/handlers/wsgihandler.py web2py' in the
instructions below and can't get any further - the error I get is 'Running
from the wrong folder'
Looking at the code in wsgih
Mika just because you've uploaded the file it doesn't mean web2py has saved
it to disk. You always get that string because you are printing it which
calls the __str__ method in stuff which returns a string.
The file is not anywhere on disk when it comes to web2py until you actually
write it t
Hello
What would be the easiest way to detect which language has the user chosen
in view?
Thank you
--
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
I'm using the web2py ajax function and it works fine except that the 2nd
argument of the ajax function which is a list of names for the form
elements includes one that is a checkbox. The ajax submission passes
along the value of "on"
I know that the
I don't if the ajax function will accept
perhaps you can use request.cookies
e.g. taken from web2py admin app
*models/db.py*
if 'language' in request.cookies and not (request.cookies['language'] is
None):
T.force(request.cookies['language'].value)
else:
T.force('en')
*views/language.html*
{{extend 'layout.html'}}
{{if hasattr(T,'ge
the value of checkbox is either on or None
*e.g.*
*controllers/default.py*
def callback(session_order_product):
counter = int(request.vars.counter)
if request.vars.action == 'adjust_factory':
id = int(request.vars.id)
factory = request.vars.factory
if factory == 'on':
factory = 'None'
session_order
Based on the selected language i send a different file to user when he/she
registers
i user this
if any("adminLanguage=sl" in s for s in request.env.HTTP_COOKIE.split(";")):
formFile = os.path.join(request.folder, 'private',
'formular_WoShi_podatki.doc')
else:
formFile = os.path.join(re
Hello Massimo,
Can we plug this into the book app to get better search capability?
Richard
On Tue, Mar 14, 2017 at 5:19 AM, Ian Ryder wrote:
> Hi, has anyone successfully set up ELB with web2py? I've been trying and
> struggling to get very far.
>
> I made it as far as 'web2py/handlers/wsgihan
UP
Need help
Richard
On Mon, Mar 13, 2017 at 2:03 PM, Richard
wrote:
> Hello,
>
> I am analysing my app and found that many tables that I thought were lazy
> (lazy_tables = True) are actually not... Investigating why was that... I
> found (I think) that 'reference table_name' cause a table to
Referenced tables should be lazy yes as long as you use the string version
"reference anothertable".
--
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
But they are not. I can't understand why as the fact that they are
referenced seems to be the only thing that trigger them to be defined at
each request. I mean if I comment the reference field they stop to be
defined they goes in the lazy array in response.toolbar db.tables...
So, I don't think t
:(
Same thing with master...
On Tue, Mar 14, 2017 at 11:44 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:
> But they are not. I can't understand why as the fact that they are
> referenced seems to be the only thing that trigger them to be defined at
> each request. I mean if I comment
Can you provide a minimal app where I see this issue?
--
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
Will try...
Will see at the same time if I can reproduce...
Richard
On Tue, Mar 14, 2017 at 12:15 PM, Leonel Câmara
wrote:
> Can you provide a minimal app where I see this issue?
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/w
I notice a strange thing with trunk... When looking at db stats, I got
duplicated sql calls... For instance I use to do an insert at each request
to log what user are doing and this insert was perform twice not sure why
though...
Richard
On Tue, Mar 14, 2017 at 12:17 PM, Richard Vézina <
ml.richa
I reproduce it...
Will remove as much things as possible as it a bit dirty for such kind of
dummy app.
Richard
On Tue, Mar 14, 2017 at 12:20 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:
> I notice a strange thing with trunk... When looking at db stats, I got
> duplicated sql calls..
Actually it comes from T, the issue remains even with no xml() or XML
involved.
Sorry but I reduced the function to the wrong line : I had a T = current.T
at the beginning of get_dashboard() which
deletion didn't suppress the issue.
It seems that an involuntary (my bad) spelling of the returned
Ok I've found the problem.
You have 2 IS_IN_DB validator calls where you use db.address.id and
db.phone_number_kind.id instead of "address.id" and "phone_number_kind.id"
But the bigger problem is that you are enabling record versioning for all
tables which pretty much makes them all load.
Inst
Thanks for the look up... Too many questions at the same time, will review
my code base on your pin point...
:)
Richard
On Tue, Mar 14, 2017 at 3:28 PM, Leonel Câmara
wrote:
> Ok I've found the problem.
>
> You have 2 IS_IN_DB validator calls where you use db.address.id and
> db.phone_number_k
Good catch for the IS_IN_DB() I wrote this part fast (address book part)
long time ago in a pet app and copy the code in production without too much
double check...
I am not sure I understand why you say that I record versioning the whole
tables as far as I understand this version only auth_user,
About redefine auth tables, I don't know another way to set username=True
than :
auth.define_tables(username=True)
I had in my todo-list to refactor my code to use the new way of customizing
auth tables, maybe it would solve this issue if it really is one??
Richard
On Tue, Mar 14, 2017 at 3:55
As far as I can understand I am using it properly and not all the tables
are versionned :
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Record-versioning
As I set it for auth_user only and not use .enable_record_versioning() but
._enable_record_versioning()... Can s
Hi All!
Is it possible to authenticate web2py users through the freeradius server?
Thx
--
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
It seems related to as when I comment it all tables are lazy :
db.auth_user._enable_record_versioning(archive_db=db,
archive_name='auth_user_archive',
current_record='current_record',
You can pass T() to module or use current.T(), I think the later is the
proper way to do now as current wasn't existing before we had to pass
request, T(), etc...
http://web2py.com/books/default/chapter/29/04/the-core#API
"Other objects and modules are defined in the libraries, but they are not
a
http://web2py.com/books/default/chapter/29/04/the-core#Sharing-the-global-scope-with-modules-using-the-current-object
current.request, response, etc
On Tue, Mar 14, 2017 at 4:40 PM, Richard Vézina wrote:
> You can pass T() to module or use current.T(), I think the later is the
> proper way to d
And there must be something else involve as in my app (not the dummy app I
packaged) commenting the above not make the defined table become lazy as it
does in not_lazy app...
:(
Richard
On Tue, Mar 14, 2017 at 4:35 PM, Richard Vézina wrote:
> It seems related to as when I comment it all tables
My app predate auth.signature that why I am not using it, I would had to
refactor alot of table. But would be good to do it as I would have the
chance to harmonize, I sometimes don't use signature for less important
table and my custom signature fields names are not very "clean code" proof
or sure.
# Start collecting queries here.
queries = {q[0] for q in db._timings}
[lots of intervening code]
# Somewhere later, possibly in another file.
queries = list({q[0] for q in db._timings} - queries)
Above, the final value of queries will include all the SQL queries made
between the two points in
>
> Generally for me Set seems to be weird layer to hold where clause... why
> not just have where-query arg in crud db actions (seems adapters do this)?
>
What do you mean by that? Can you show an example?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://g
Found couples other issue with IS_IN_DB() declarations in other
controllers...
But I use my own version of lazy_option (
https://github.com/scubism/sqlabs/blob/master/controllers/plugin_lazy_options_widget.py)
and the way field attribute has to be pass is another source of unlazy
table...
Except
31 matches
Mail list logo