Op woensdag 3 oktober 2012 00:42:47 UTC+2 schreef rochacbruno het volgende:
You could do that from the command line, too, with a python script.
I understood that it need to run under the current running environment
right? if I have a server running (apache) and I open a web2py console I
I was excited too, never thought that tornado runs on Windows, where no
epoll/kqueue is available.
However, I'm ok with having a normal webserver (performance-wise, I
expect to be at least fast as rocket/cherrypy) on Windows but a speedup
under Linux, then I bumped into this
Ok, with some modifications can be run on windows with anyserver.py . So, I
remain with one only doubt ... is tornado on Windows fully tested ?
def motor(app, address, **options):
import motor
app = motor.WSGIContainer(app)
http_server = motor.HTTPServer(app)
On Wed, Oct 3, 2012 at 9:40 AM, Niphlod niph...@gmail.com wrote:
Ok, with some modifications can be run on windows with anyserver.py . So, I
remain with one only doubt ... is tornado on Windows fully tested ?
def motor(app, address, **options):
import motor
app =
On Wed, Oct 3, 2012 at 9:14 AM, Niphlod niph...@gmail.com wrote:
I was excited too, never thought that tornado runs on Windows, where no
epoll/kqueue is available.
However, I'm ok with having a normal webserver (performance-wise, I expect
to be at least fast as rocket/cherrypy) on Windows but
On Wed, Oct 3, 2012 at 5:56 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Please open a ticket your your proposal and the link. This is a serious
possibility!
Can the monolitic build be automated?
I guess so, but don't know how without enter in the lex/yacc world.
Probably not worth
Well, seems to work. I'd need to know if there is some way to test if all
web2py framework works on on this, but a normal app seems to do pretty
fine.
Windows Vista (aaargh!), PortablePython 2.7.3 32-bit, T8100 2.10Ghz, 3 GB
RAM, adjusted softcron in anyserver.py (to allow removal) in order to
The speed difference is huge!
Dne středa, 3. října 2012 11:35:06 UTC+2 Niphlod napsal(a):
Well, seems to work. I'd need to know if there is some way to test if all
web2py framework works on on this, but a normal app seems to do pretty
fine.
Windows Vista (aaargh!), PortablePython 2.7.3
On Wed, Oct 3, 2012 at 10:35 AM, Niphlod niph...@gmail.com wrote:
Well, seems to work. I'd need to know if there is some way to test if all
web2py framework works on on this, but a normal app seems to do pretty fine.
Windows Vista (aaargh!), PortablePython 2.7.3 32-bit, T8100 2.10Ghz, 3 GB
me too. The default webserver is not - usually - meant for production
anyway. I started the test with the idea let's see if tornado on windows
(i.e. without all the goodies of select/epoll) can be at least comparable
with a threaded server.
PS: cherrypy (and rocket) uses a separate thread for
Thank you guys, I'm gonna try this out on the production
On Wednesday, October 3, 2012 6:49:31 AM UTC+8, Jonathan Lundell wrote:
On 2 Oct 2012, at 3:42 PM, Bruno Rocha rocha...@gmail.com javascript:
wrote:
You could do that from the command line, too, with a python script.
I understood
Actually, when the tables are used by themselves ! with a simple controller
The first one ( auth_user ) works perfectly ... datas are recorded
but the second one ( user_info ) gives me a clear error on 2.0.9 stable
version
type 'exceptions.RuntimeError' Unable to handle upload
but with the
Here is another controller I tried, and I still get the same results ( no
data is recorder in the tables, no errors or ticket given ) and on the last
submit button .. nothing happens :
def register():
import os
STEPS = {0:
On Wed, Oct 3, 2012 at 11:31 AM, Niphlod niph...@gmail.com wrote:
me too. The default webserver is not - usually - meant for production
anyway. I started the test with the idea let's see if tornado on windows
(i.e. without all the goodies of select/epoll) can be at least comparable
with a
The mytables variable ony has values in steps 0,1 but you loop over it for
insert only in step 2 (when it is not defined). You do not get an error
probably because it already defined in the outer scope.
On Wednesday, 3 October 2012 06:23:36 UTC-5, Don_X wrote:
Here is another controller I
I got that part (barman and beers are nice :P).
I envisioned that the threaded servers start one thread per request, and
that thread closes when the request ends.
So, if only 1 thread is available at most, basically all the requests have
to be served serially (the server queues them and pass
2012/10/3 Niphlod niph...@gmail.com
I thought that the achievable concurrency in threaded servers related
semi-linearly with the number of available threads, but it seems that this
is not the case.
the cause is GIL. You could see that on pypi, that has no GIL, but I never
tested.
CPython is
Just for the sake of discussion: are you all saying that in threaded
servers on Cpython the best thing is to have a single thread ? Why on hell
should anyone support a thread-pool in the beginning if that's the case?
Cherrypy existed long before pypy, so it's not a matter of we predisposed
a
With datatable do you mean that one from datables.net?
If yes, I used this guide http://datatables.net/blog/Twitter_Bootstrap_2 and
I did not have any problem.
Il giorno mercoledì 3 ottobre 2012 02:16:07 UTC+2, apps in tables ha
scritto:
For me,
The using of datatable will make the menu
Thanks...
--
The autocomplete box takes too long to disappear when it is no longer in
focus. I found the setting for this, it is in gluon/sqlhtml.py :
[inside __call__ for autocomplete, line 597 for web2py 1.99]
attr['_onblur']=jQuery('#%(div_id)s').delay(3000).fadeOut('slow'); % \
Hi,
I am using Raphael for drawing diagrams and want to store de location of
the elements in the database.
Do I need $.ajax or can I stick to ajax helper?
View:
var up = function () {
this.attr({opacity: 1.0});
var locx = this.attr(x);
ajax('new_post', ['locx'],
Sorry Jim i just saw your post right now.
I don't use the grid search. I use a normal form to collect the key:value
pairs.
Then I build the query, and I pass it to the grid, with the parameter
searchable =False.
The advantage is when I have defined the keys I can easily combine (in
AND) the
On 2 Oct 2012, at 9:24 PM, lyn2py lyn...@gmail.com wrote:
The new (or maybe not so new, by now) app-specific routers is an excellent
idea. I love it.
Can I get some help regarding the use of it?
The following code is in my routes.py file, but it doesn't seem to work:
routers = {
I had a slightly different case, maybe useful to share. I had a table
model with two references to make and I wanted the models in the grid,
but filtered by one of the two referenced fields of the make table.
db.py
db.define_table('make',
Field('name'))
Make_one =
I think the class for autocomplete is pretty compact and self contained.
So, you can just copy the class in your app somewhere in models if you need
from many differents controllers or in the controller where you need it
instead, rename it and change all what you want then.
I had make a
With similar code in the main routes.py (main = in the web2py dir), the URL
helper will leave out the 'default' and 'index' from the web address.
E.g. assuming I have 'some_func' function in default.py controller,
URL generated = *http://weburl.com/myapp/some_func*
Likewise, for index page, it
Threads in python are slower then single threads on multicore machines (any
modern computer). So 2 threads on 2 cores is almost twice as slow instead
of twice as fast because of the GIL. Yet there are advantages. If a thread
blocks (because it is streaming data or doing a computation), a
ajax helper is a just a shortcut for $.ajax but I recommend using $.ajax.
It is more flexible.
On Wednesday, 3 October 2012 09:37:09 UTC-5, Richard wrote:
Hi,
I am using Raphael for drawing diagrams and want to store de location of
the elements in the database.
Do I need $.ajax or can I
Niphlod- Thanks, you're correct- that's exactly what's happening.
We should then update the *requires_https()* implementation:
*gluon/globals.py:*
def requires_https(self):
If request comes in over HTTP, redirect it to HTTPS
and secure the session.
if not
Massimo,
I thought so.
But what is missing in th follwowing?
View:
var up = function () {
this.attr({opacity: 1.0});
var locx = this.attr(x);
$.ajax({
type: POST,
url: {{URL('new_post')}},
data: locx})
};
Controller :
def new_post():
tested on windows the hello world and a complete app's index page,
results are quite similar in some ways at least on windows seems that
having a few threads also if in relatively high concurrency environment
lead to faster response times (forget about requests served per second, I'm
also
Well, now I see: It's validating the auth data, but not the other's table
date. Already tried set onvalidation parameter, but when I do it, it's
saving the Empresa table data, but not creating the user. =/
Here's the methos
def user():
if request.args(0) == 'login':
response.view =
On 3 Oct 2012, at 8:38 AM, lyn2py lyn...@gmail.com wrote:
With similar code in the main routes.py (main = in the web2py dir), the URL
helper will leave out the 'default' and 'index' from the web address.
E.g. assuming I have 'some_func' function in default.py controller,
URL generated =
Hello,
I would generate programmatically a bunch of links with A() helper from
controller, but I fall on syntax error because of data-toggle custom
bootstrap attribute (new with html5).
Ex.: UL([ LI(A(l.upper(), _href='#tab1', *_data-toggle='tab'*)) for l in
list_of_letters_required ],
I have the same problem, which I solved by this way:
def download():
if (request.args(0) or '').endswith('swf'):
from cStringIO import StringIO
import os
import time
response.headers['Content-Disposition'] = ''
filename =
In trunk!
On Wednesday, 3 October 2012 10:51:40 UTC-5, Yarin wrote:
Niphlod- Thanks, you're correct- that's exactly what's happening.
We should then update the *requires_https()* implementation:
*gluon/globals.py:*
def requires_https(self):
If request comes in over HTTP,
url: {{URL('new_post')}},
should be
url: {{=URL('new_post')}},
On Wednesday, 3 October 2012 11:14:03 UTC-5, Richard wrote:
Massimo,
I thought so.
But what is missing in th follwowing?
View:
var up = function () {
this.attr({opacity: 1.0});
var locx =
Please put the attribute with the hyphen in a dictionary:
UL([ LI(A(l.upper(), _href='#tab1', **{{_data-toggle:'tab'}})) for l
inlist_of_letters_required
], _class='nav nav-tabs')
From web2py book http://web2py.com/books/default/chapter/29/5#HTML-helpers:
*Instead of a set of unnamed
There is an old post by Tim who did extensive benchmarks with Rocket. He
discusses extensively problems with using ab for testing. I cannot find the
post unfortunately.
On Wednesday, 3 October 2012 11:18:40 UTC-5, Niphlod wrote:
tested on windows the hello world and a complete app's index
On Wed, Oct 3, 2012 at 2:09 PM, Niphlod niph...@gmail.com wrote:
PS: ab -c 1000 -n 1 on tornado-motor fails after ~7000 requests,
cherrypy finishes without issues (both with 1-1 (89 rps) and 10-20
threads(18 rps)).
tornado fails because on Windows it's using select() and select doesn't
oops :)
def download():
if (request.args(0) or '').endswith('.swf'):
import os
response.headers['Content-Disposition'] = ''
filename = os.path.join(request.folder,'uploads',request.args(0))
return response.stream(open(filename,'rb'))
else:
return
Great, I thought about it, I should read the book before sorry!
Richard
On Wed, Oct 3, 2012 at 1:33 PM, Paolo Caruccio
paolo.carucci...@gmail.comwrote:
Please put the attribute with the hyphen in a dictionary:
UL([ LI(A(l.upper(), _href='#tab1', **{{_data-toggle:'tab'}})) for l
UL([ LI(A(l.upper(), _href='#tab'+str(i), **{'_data-toggle':'tab'})) for i,
l in enumerate(list_of_letters_required) ], _class='nav nav-tabs')
Only one pairs of curly brackets and the attribute needs to be quoted since
it is a key dict finally...
Thanks!
Richard
On Wed, Oct 3, 2012 at 1:44 PM,
My fault. Original message corrected. Thank you
Il giorno mercoledì 3 ottobre 2012 19:51:26 UTC+2, Richard ha scritto:
UL([ LI(A(l.upper(), _href='#tab'+str(i), **{'_data-toggle':'tab'})) for
i, l in enumerate(list_of_letters_required) ], _class='nav nav-tabs')
Only one pairs of curly
:)
On Wed, Oct 3, 2012 at 1:53 PM, Paolo Caruccio
paolo.carucci...@gmail.comwrote:
My fault. Original message corrected. Thank you
Il giorno mercoledì 3 ottobre 2012 19:51:26 UTC+2, Richard ha scritto:
UL([ LI(A(l.upper(), _href='#tab'+str(i), **{'_data-toggle':'tab'})) for
i, l in
That works better indeed, but,
var up = function () {
this.attr({opacity: 1.0});
var locx = this.attr(x);
$.ajax({
type: POST,
url: {{=URL('new_post')}},
data: locx})
gives a record insert with
Controller :
def new_post():
Dear Bruno
Any update about powerTable + Web2py 2.0.9
--- On Mon, 10/1/12, Bruno Rocha rochacbr...@gmail.com wrote:
From: Bruno Rocha rochacbr...@gmail.com
Subject: Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no
attribute 'virtual'
To: web2py@googlegroups.com
Date: Monday,
Hi all.
I continue diving into unit-testing and I'd like to know how do you
organize your applications to be unit-tested.
Thin controllers? DAO classes? How do you decouple things in web2py to
make unit-testing easy?
--
Vinicius Assef
--
Fran,
Hi Fran,
It's been a while since you posted this but I'd like to know which solution
you chose. Sounds like you have much more experience than I have and what
you described above (the options to have the user see all relevant fields
in a single form) was exactly my experience on a few
The following seems to work:
This in the view:
var up = function () {
this.attr({opacity: 1.0});
var locx_val = this.attr(x);
$.ajax({
type: POST,
url: {{ =URL('new_post') }},
data: {locx:locx_val}
})
results in the db:
Storage
I know of the limitations of tornado's architecture on Windows: before
today I didn't even know it was possible to run tornado on Win :D
To sum up, the problem is: web2py needs a pure python webserver that
supports SSL. It needs to be runnable on Win, Mac and Linux (possibly on
Solaris too).
I just noticed that Andriy has updated the article with an Isolated
Benchmark yesterday. I quote: In order to provide more reliable benchmark
I get rid of application server and network boundary. As a result I
simulated a valid WSGI request and isolated calls just to framework alone
The
no news there. we know that web2py is more packed of features by default.
On Wednesday, October 3, 2012 10:51:30 PM UTC+2, LightDot wrote:
I just noticed that Andriy has updated the article with an Isolated
Benchmark yesterday. I quote: In order to provide more reliable benchmark
I get rid
I have to make a slice about that and redo the integration with the new
version of the autocomplete widget because it have been changed since I did
my own autocomplete select or add option.
Hi Richard, I look forward to that because I also want to try to tweak this
widget.
--
Hi Tim,
If you can't wait, and have the skill to take the path of tweaking a widget
you can have look at this thread :
https://groups.google.com/forum/?fromgroups=#!topic/web2py/9KamKgHKUwU
You can also read this slice :
http://www.web2pyslices.com/slice/show/1446/widget-select-or-add-option
Hello,
I am not exactly sure how this is relevant about how web2py approach to
bootstrap, but it seems to be a logical evolution of the decoupling content
and container with HTML/CSS/PHP,Python, etc., as exposed in the post.
I have a SQLFORM.grid.
When the user updates field 'a' in the grid, before submitting the form,
field 'b' should represent a calculation based on value of 'a'.
For instance b=a+1
db.py
db.define_table('t',
Field('a', type='integer'),
Field('b', type='integer')
)
default.py
def
Thanks Jonathan. I appreciate this!
On Thursday, October 4, 2012 12:23:30 AM UTC+8, Jonathan Lundell wrote:
On 3 Oct 2012, at 8:38 AM, lyn2py lyn...@gmail.com javascript: wrote:
With similar code in the main routes.py (main = in the web2py dir), the
URL helper will leave out the 'default'
chech this
http://web2py.com/books/default/chapter/29/07?search=onupdate
may help.
On Wed, Oct 3, 2012 at 9:49 PM, alex a22...@gmail.com wrote:
I have a SQLFORM.grid.
When the user updates field 'a' in the grid, before submitting the form,
field 'b' should represent a calculation based
I compile app very often to move it to production, and I would like to do
it via command line (or a sh script). I tried
python -c import gluon.compileapp;
gluon.compileapp.compile_application('applications/appname')
From Thadeus' blog but it throws an error:
Traceback (most recent call
61 matches
Mail list logo