Nice idea :).
I would create a database with the equations including metadata and create
froms dynamically like sqlform.
A table would have all the equations referring to an other tabel having the
equation components als calulated fields.
Think from a database driven design rather than a view ba
Here's how I do it and I assume Web2py does something similar when it, for
example, resets the "Working" caption on buttons.
The Javascript/Jquery whatever in the client changes the state of the
button. I do it before sending the ajax post. I don't know how Web2py does
it.
It doesn't matter wh
Thanks ...
Niphlod - I'll try to create a minimal app to reproduce.
Cliff - are you suggesting to use the web2py ajax function rather
the jQuery post?
I'm also trying to understand why web2py is intercepting the event and why
it doesn't think the response is succesful which I assume is why the
Next weekend I can share the code. I have to cleanning it a little bit.
Ricardo
On 8/11/14, Gideon George wrote:
>
>>
>> WOW! That's really great to hear. I don't even know how to start
>> appreciating right now.
>
> I am really grateful for that, Absolutely grateful! I will love to learn
> and
I can make a patch in next friday/weekend, but you want a patch against what?
What I've attached was a simple app showing two bootstrap3 formstyle
alternatives.
Should I patch the formstyle_bootstrap3 in sqlhtml.py?
Ricardo
On 8/11/14, Massimo Di Pierro wrote:
> Would you send me this as a pa
Massimo,
The new recipe you propose is "bottle+dal+validators+auth+collection"
Could it be "bottle++validators+auth+collection?
I have found myself needing to execute complex SQL queries. In this
situation, in my opinion, psycopg2 would serve me just as well as dal.
On Sunday, June 22, 2014
get rid of the target in your ajax call and use ':eval' instead.
Then reset the button in your response.
On Sunday, May 4, 2014 9:33:05 AM UTC-4, John Drake wrote:
>
> I've created a simple ajax form to update a "post" database. For some
> strange reason when I post a new message, the button gr
If, like me, you use the same static files on every page, just hard code
them into layout.html.
I realize this may make upgrading more, um, interesting, but it's much
simpler than pattern-based routing.
On Wednesday, August 13, 2014 11:23:52 AM UTC-4, Louis Amon wrote:
>
> I am using a CDN and
you can use whatever you like it just needs to accomodate how web2py
handles ajax.
Without a complete example I can't tell what's going wrong with your own
implementation. If you can, pack a minimal app to reproduce the behaviour
On Wednesday, August 13, 2014 10:50:54 PM UTC+2, Michael Belle
Thanks Niphlod,
I'm not using inline JS or explicitly using web2py.js.
I'm using a Bootstrap Modal pretty much verbatim from the Bootstrap
examples. It appears that web2py js is capturing the submit and disabling
the button but not detecting the response and enabling the submit - is that
corr
the logic behind is suppressing double submission. web2py disables the
submit button when you click on it until a proper response is returned.
Don't EVER use inline javascript, and don't use web2py.js internal
functions without proper knowledge of the inner workings :-P
On Wednesday, August 1
there's no other way around it, in every programming language. You want to
do something in a transaction, the db won't let you do it, you catch the
exception (rollbacking) and deal with it.
On Wednesday, August 13, 2014 7:30:58 PM UTC+2, Jack Kuan wrote:
>
> How does one usually deal with such c
Hey everyone!
We are looking for a functional test script to be written for a web2py
application for a small fee.
We will provide a test environment, user access control list, list of
URL's, expected results, and actual results.
Results are behavioral in nature and will include modals.
We are
thanks for you reply.
I will check tomorro at work.
so on the controler i can get the rows by doing grid.rows?
The query is also stored on an accessible grid proprety ?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
I just encountered the same problem. I'm using a Bootstrap Modal form and
encountering the same problem - the form sends and receives data via AJAX
but then adds the 'disabled' class to the button.
I found this logic in web2py.js but I'm not clear on what's happening and
why:
// Form inpu
Can you point me to any documentation?
On Wednesday, 13 August 2014 04:52:00 UTC-5, Remco Boerma wrote:
>
> Thanks Massimo,
>
> Well, with CORS it depends. I used these to get CORS working with at IE11
> and Chrome (latest)
>
> response.headers['Access-Control-Allow-Origin']
> response.
Please open a ticket about this. This is a major issue. Perhaps we should
remove the web based shell.
On Wednesday, 13 August 2014 02:41:17 UTC-5, Giacomo Dorigo wrote:
>
> Today I discovered an other problem with the admin shell.
> If I execute command 1
> and then command 2, at this point it wi
How does one usually deal with such conflict? (two identical(except for
id's) inserts causing a violation of an unique constraint)
Isolating the insert into its own transaction and then do a db.commit(),
catch any exception and then ignore?
Thanks
On Wednesday, August 13, 2014 10:57:13 AM UTC-
Today I discovered an other problem with the admin shell.
If I execute command 1
and then command 2, at this point it will re-execute command 1 too.
If then I execute command 3, it will execute again also 1 and 2.
This is while running web2py from source code on Windows with simple
python web2py.
On Tuesday, August 12, 2014 4:28:11 PM UTC-4, Kenneth wrote:
>
> Hello everyone,
>
> I'm building a site that clients subscribes to so I need to limit their
> login based on the subscription. Is there a built in feature to limit login
> to a date range?
>
>
> Kenneth
>
>
Can't your successful log
I am using a CDN and am trying to configure web2py to use it instead of the
classic static file service.
So far I've been using pattern-based routes like this :
cdn = 'https://xxx.cloudfront.net'
routes_in = (...
('/static/$anything', cdn + '/static/$anything'),
I also tried to place the
> current.response.files.append(URL('static',
> 'jqplot/jquery.jqplot.min.js'))
> current.response.files.append(URL('static',
> 'jqplot/jquery.jqplot.min.css'))
> current.response.files.append(URL('static',
> 'jqplot/plugins/jqplot.barRenderer.min.j
El 13/08/14 a las #4, Leonel Câmara escribió:
> Simply adding to current.response.files may not works if the request
> is ajax (say your module is loaded).
But it's not loaded via ajax, I call it like this:
> @requires_get_arguments(('grupo', db.grupo),
> ('productor', db.
El 13/08/14 a las #4, Anthony escribió:
> Can you show your module code? Are you doing the appending at the top
> level in the module, or within a function/method?
The latter:
> # -*- coding: utf-8 -*-
> # (C) Copyright (C) 2012-14 Pablo Angulo
> # This file is part of karakolas .
>
> # karakolas
the problem in concurrency (andduplication) isn't the update part, it's the
insert part
On Wednesday, August 13, 2014 1:39:56 PM UTC+2, Leonel Câmara wrote:
>
> Couldn't he use a _for_update argument there to make this work in some
> adapters?
>
> db.mytable.update_or_insert(q, name='test',
The problem was the alphabetical order of models, thanks for the help
El lunes, 11 de agosto de 2014 12:12:08 UTC-6, Leonel Câmara escribió:
>
> You made a typo:
>
> for row in db(db.categorias*.id > 0*).select():
> response.menu.append((T(row.nombre)))
>
> Fix in bold.
>
> BTW you probably wa
> def new_style_virtual_field_test():
db = DAL('sqlite:memory',pool_size=1)
> db.define_table('myorder',
> Field('a','integer'),
> Field('b','integer')
> )
> db.myorder.c = Field.Virtual(lambda row:row.a * row.b)
> db.myorder.insert(a=2,b=3)
> return db().
Can you show your module code? Are you doing the appending at the top level
in the module, or within a function/method?
On Wednesday, August 13, 2014 7:14:46 AM UTC-4, pa...@cancamusa.net wrote:
>
>
> Dear all:
> In the process of moving functionality from models to modules, I'm trying
> to add
Simply adding to current.response.files may not works if the request is
ajax (say your module is loaded).
In my modules I like to use a function the plugins in s-cubism.com use to
set files:
def _set_files(files):
if current.request.ajax:
current.response.js = (current.response.js o
Couldn't he use a _for_update argument there to make this work in some
adapters?
db.mytable.update_or_insert(q, name='test', _for_update=True)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/w
If I understand, you mean that whenever I call JQPlot
jqplot = JQPlot(*args, col_represent=str)
I have to append the following lines:
response.files.append(URL('static', 'jqplot/jquery.jqplot.min.js'))
response.files.append(URL('static', 'jqplot/jquery.jqplot.min.css'))
Put the appending code in the controller.
On Wednesday, August 13, 2014 7:14:46 AM UTC-4, pa...@cancamusa.net wrote:
>
>
> Dear all:
> In the process of moving functionality from models to modules, I'm trying
> to add some filesto the header. When the file was in models, I did:
>
> respon
Dear all:
In the process of moving functionality from models to modules, I'm trying
to add some filesto the header. When the file was in models, I did:
response.files.append(URL('static', 'jqplot/jquery.jqplot.min.js'))
response.files.append(URL('static', 'jqplot/jquery.jqplot.mi
I've made some confusion with request.args, but the point still stands that
you should be using args instead of request.args.
I can tell you the restful decorator doesn't care if it's a PUT or a PATCH
as it gets the method from request.env.http_method.
So you're probably on the right track and
Thanks Massimo,
Well, with CORS it depends. I used these to get CORS working with at IE11
and Chrome (latest)
response.headers['Access-Control-Allow-Origin']
response.headers['Access-Control-Allow-Methods']
response.headers['Access-Control-Allow-Headers']
Maybe something more dy
Hi all,
I don't get the following errors and results. My goal is to have a virtual
field and i can't get it to work the way i want it - and what i think is
described in the book as it should work. What am i doing wrong here?
Below are serveral independent samples of what i thought had to work
Ok just I tried this
@request.restful()
def page():
def PATCH(*args, **vars):
if args[0]:
print 'PATCH args: ', args
But I still get a 400 "Bad Request" error (it does not say 400 "invalid
arguments") that why I think it does not even come to this point.
Also request.arg
that's basic versioning theory of databases.
If you do two operations in two separate transactions that, in "english"
can be translated as "if you don't find this record, please insert it", the
two will happily succeed one after another if they are concurrent.
That's why unique constraints are
Hi,
I want to use mail.send in Scheduler. Is there any way to use it in
scheduler?
AFAIK task which queued in scheduler.queue_task must be present in
models/scheduler.py
So how can I override mail.send() in models/scheduler.py
--
Resources:
- http://web2py.com
- http://web2py.com/book (Do
My conclusion is that the menu is becoming too large any performance
improvement will have minimal user experience improvement. I'll create
other menus's on locations where users are working at that time.
Richard D
On Tuesday, August 12, 2014 11:56:35 AM UTC+2, Richard wrote:
>
> Hello,
>
> I
40 matches
Mail list logo