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 conso
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
https://github.
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)
ht
On Wed, Oct 3, 2012 at 9:40 AM, Niphlod 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 = motor.WSGIContainer(a
On Wed, Oct 3, 2012 at 9:14 AM, Niphlod 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 a speedup un
On Wed, Oct 3, 2012 at 5:56 AM, Massimo Di Pierro
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 it.
Suggestions?
Ricard
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.
On Wed, Oct 3, 2012 at 10:35 AM, Niphlod 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
> RAM, adjusted sof
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 >
> wrote:
>
> You could do that from the command line, too, with a python script.
>>
>
> I understood that it need to run un
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
Unable to handle upload
but with the codes of the controller shown abov
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:
> ('Iagreeto','first_name','last_name','email','email_ch
On Wed, Oct 3, 2012 at 11:31 AM, Niphlod 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 threaded server".
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 t
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 it
2012/10/3 Niphlod
> 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 better on forked se
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 T
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 m
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');" % \
dict(div
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'], 'r
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 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 = {
> app: dict(
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 = db.make.with_alias(
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 integratio
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
multit
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
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 global_settin
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_pos
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 = 'default/login
On 3 Oct 2012, at 8:38 AM, lyn2py 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 = http://weburl.
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 ], _class
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 = os.path.join(request.folder,'upl
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 H
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 argumen
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 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 scale
well. That
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 res
Great, I thought about it, I should read the book before sorry!
Richard
On Wed, Oct 3, 2012 at 1:33 PM, Paolo Caruccio
wrote:
> 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
> ], _c
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 b
:)
On Wed, Oct 3, 2012 at 1:53 PM, Paolo Caruccio
wrote:
> 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
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():
d
Dear Bruno
Any update about powerTable + Web2py 2.0.9
--- On Mon, 10/1/12, Bruno Rocha wrote:
From: Bruno Rocha
Subject: Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no
attribute 'virtual'
To: web2py@googlegroups.com
Date: Monday, October 1, 2012, 1:04 AM
Are you running new v
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 al
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:
Which is
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). Ra
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 art
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 ge
>
> 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
Th
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.
http://ruby.bvision.com/blog/please-stop-embedding-bootstrap-classes-i
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 index
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 > 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 w
chech this
http://web2py.com/books/default/chapter/29/07?search=onupdate
may help.
On Wed, Oct 3, 2012 at 9:49 PM, alex 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 on value of
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/')"
>From Thadeus' blog but it throws an error:
Traceback (most recent call last):
F
Hello I am having a seemingly difficult time with this :-)
and I am hoping some one can aid in solving this :-)
I am trying to make an item reserved from start-date to end-date any ideas
*cheers here is my code
This my latest attempt googled and found this function
import datetime
def dateran
I'm trying to set up unit tests and run into this error during the creation
of the test db (using testrunner.py). I've looked at the code of this
method in gluon.dal, but I really don't know enough about csv importing to
know how to debug the error. So any help would be much appreciated.
Here i
63 matches
Mail list logo