On 14 sep, 14:24, mdipierro mdipie...@cs.depaul.edu wrote:
you can do
@auth.requires(auth.has_membership(auth.id_group('role1')) or
auth.has_membership(auth.id_group('role2')))
but this is not the right way to handle it.
You should add permissions:
This is a complete rewrite of wsgiserver. All functions are different.
This is trivial to port to Python 3 and/or lightweight Stackless
python threads (althought the pros/cons are not quite clear to me).
I am also thinking about rewriting the accepting mechanism to include
some of the features
IMHO, concurrency is more important than raw speed. In the world of
AJAX, we have smaller, more-frequent requests.
Thanks for this.
On Sep 18, 7:50 am, mdipierro mdipie...@cs.depaul.edu wrote:
This is a complete rewrite of wsgiserver. All functions are different.
This is trivial to port to
This server was mainly an exercise. I am planning to separate the
responder from the code that deal with concurrency so that different
concurrency mechanisms can be lugged in (threads, processes, none).
On Sep 18, 8:02 am, Timbo tfarr...@swgen.com wrote:
IMHO, concurrency is more important than
Jose, I have an app with an auth/permission scheme similar to yours
and it works fine. I assume that in your auth_permission data where
you say id_group you mean auth_permission.group_id. In that
table, are the table_name column values blank? And are the
record_id values 0? That's what I
The only way I make it work is get two forms + one form to get back.
View:
{{extend 'layout.html'}}
{{if session.secao:}}
Seção:nbsp nbsp nbsp
{{=db.secao[session.secao].nome}}
{{=form_voltar}}
hr
Massimo I tried to run standalone and I recived this:
E:\web2py\gluonpython web2pyserver.py 8001
Traceback (most recent call last):
File web2pyserver.py, line 260, in module
s=web2pyWSGIServer('127.0.0.1:'+sys.argv[1],test_wsgi_app,min_threads=5,max_
threads=10)
TypeError: __init__()
sorry, I tried to make it api compatible with cherrypy and broke the
hello world example. You can find the latest here:
http://web2py.com/examples/static/web2pyserver.py
Massimo
On Sep 18, 11:20 am, Alex Fanjul alex.fan...@gmail.com wrote:
Massimo I tried to run standalone and I recived this:
Sorry, please repot it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
Just now I was reviewing, and efectively the init call was wrong...
great!
El 18/09/2009 18:23, mdipierro escribió:
sorry, I tried to make it api compatible with cherrypy and broke the
hello world example. You can find the latest here:
http://web2py.com/examples/static/web2pyserver.py
Massimo, how is posible such a difference between Mac (or Linux) and
Windows 7??? more than double in Requests per second :-(
Will I have/do something wrong?
[web2py Version 1.65.1]
E:\wamp\bin\apache\Apache2.2.11\binab -n 1 http://127.0.0.1:8001/
This is ApacheBench, Version 2.3
It would be great if you could run and publish more benchmarks for
this, cherrypy and apache+mod_wsgi and a couple of different
hello_world apps.
I have not been able to test chunked upload since I do not know how
which clients do it. Firefox does not. The code would be much smaller
without
Hello,
Maybe it's something obvious, but can not find the problem (or
solution). The worst thing is that it was working.
Model:
http://pastebin.com/m492daf9a
Controler:
http://pastebin.com/m79a1b876
we see that:
db.clasificados.foto.requires = IS_NULL_OR(IS_IMAGE())
if I send the empty foto
You have..:
if len(request.vars):
categoria = request.vars.values()[0]
rubros = db(db.rubros_clasificados.id_categoria ==
categoria).select()
and truns out categoria is not an integer.
On Sep 18, 12:47 pm, Jose jjac...@gmail.com wrote:
Hello,
Maybe it's something obvious, but
Hi,
I have two apps in my Web2Py:
init - default website.
blog - my personal blog.
I need of this mapping:
www.mysite.com ( the default index page )
point to init/default/index
www.mysite.com/company ( a company page )
You could just do:
routes_in=(('/company','/init/default/company/'),)
the other two will work by default
Massimo
On Sep 18, 1:08 pm, Leandro - ProfessionalIT lsever...@gmail.com
wrote:
Hi,
I have two apps in my Web2Py:
init - default website.
blog - my
On Sep 17, 3:29 am, mdipierro mdipie...@cs.depaul.edu wrote:
db.table.field.uploadfolder=os.path.join(request.folder,uploads/
somewhere)
I've tested it it works as-advertised, thankyou :)
A further enhancement I'd like to see is to be able to specify the
filename in the form of:
Sorry my results are very inconsistent... and I dont know why...
m4400 notebook, windows7 rtm, t9400, 4gb, 500gb, fx770
--
[[HELLOWORLD WITH WEB2PY IN APACHE+WSGI AND WITHOUT SSL (EVEN IF ITS
IN DOMAIN
I am looking to make use of Auth's facilities but implement my own
registration form. How would one go about creating a completely
custome registration form while making use of Auth? I am unable to
find any documentation on that (not in manual).
Something is wrong. Cherrypy cannot take 40x longer.
Moreover you are not benchmarking the web server but a web2py app. And
the time spent in web2py is more than the time spent in the web server
by a factor 10.
You need to benchmark a bare bone (non-web2py) hello world wsgi
application (such as
Let's say you have a registration form :
# In the model you have something like that:
class MyAuth(Auth):
auth = MyAuth(globals(), T,db)
db.define_table(
auth_user,
db.Field('user_name', length=128,default=''),
db.Field('first_name', length=128,default=''),
Hi,
If I create a form on the view and not from the controller action, how
can the form get a unique form key? Thanks
Winston
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this
Hello mate I have a small issue here.. I'm using the latest web2py
version.
Here is the situation... I'm trying to display an upload picture form
and in the form we can have three fields The picture name field, the
upload file field, and a dropdown list for the album. I only want to
display the
{{=form.hidden_fields()}}
will create the input type=hidden
On Sep 18, 2:39 pm, eddwinston eddwins...@gmail.com wrote:
Hi,
If I create a form on the view and not from the controller action, how
can the form get a unique form key? Thanks
Winston
if auth.user: db.photo.albphotoref_fk.requires = IS_IN_DB(db
(db.album.buacct_fk ==
auth.user.id), album.id, %(albumname)s)
On Sep 18, 2:49 pm, Yannick ytchatch...@gmail.com wrote:
Hello mate I have a small issue here.. I'm using the latest web2py
version.
Here is the situation... I'm trying
I am actually having to customize it far more than that in the end...
Related question though... how can one check if password entered
matches password stored in DB for that user? When I retrieve the
stored password via select(), it is encrypted. How does Auth decrypt?
Where can I find that code
It depends of what you are trying to do with the password maybe there
a way for you to avoid digging into encryption and decryption...
Anyway if you really need it, you can take a look in the Tools.py in
the method change_password... this can inspired you...
Hope it helps,
Cheers,
Yannick P.
Thank You :)
On Sep 18, 3:58 pm, mdipierro mdipie...@cs.depaul.edu wrote:
if auth.user: db.photo.albphotoref_fk.requires = IS_IN_DB(db
(db.album.buacct_fk ==
auth.user.id), album.id, %(albumname)s)
On Sep 18, 2:49 pm, Yannick ytchatch...@gmail.com wrote:
Hello mate I have a small issue
On Sep 18, 2009, at 1:06 PM, waTR wrote:
Related question though... how can one check if password entered
matches password stored in DB for that user? When I retrieve the
stored password via select(), it is encrypted. How does Auth decrypt?
Where can I find that code (what file)?
Briefly,
On 18 sep, 18:02, mdipierro mdipie...@cs.depaul.edu wrote:
You have..:
if len(request.vars):
categoria = request.vars.values()[0]
rubros = db(db.rubros_clasificados.id_categoria ==
categoria).select()
and truns out categoria is not an integer.
Ok, but there error only when
because it changes what is in request.vars.values()[0] the result of
this expression is not predictable because the values are not ordered.
Do not use
categoria = request.vars.values()[0]
On Sep 18, 3:50 pm, Jose jjac...@gmail.com wrote:
On 18 sep, 18:02, mdipierro mdipie...@cs.depaul.edu
Hi,
But just using {{=form.hidden_fields()}} does not generate a form key
On Sep 18, 10:56 pm, mdipierro mdipie...@cs.depaul.edu wrote:
{{=form.hidden_fields()}}
will create the input type=hidden
On Sep 18, 2:39 pm, eddwinston eddwins...@gmail.com wrote:
Hi,
If I create a form
Do you have a
form=FORM()
return dict(form=form)
in your controller
I just tried it and I get this:
div class=hiddeninput name=_formkey type=hidden
value=8541c665-38de-4a84-9056-22b208aa45ad /input name=_formname
type=hidden value=default //div
{{=wes}}
On Fri, Sep 18, 2009 at 3:35 PM,
How do you go about submiting two forms at once?
or do you need to create a SQLFORM.factory and then split the vars up
manually?
On Sep 17, 4:52 pm, Yarko Tymciurak yark...@gmail.com wrote:
On Thu, Sep 17, 2009 at 10:55 AM, Thadeus Burgess
thade...@thadeusb.comwrote:
I have tried this
To send mail locally, you need to specify the mail server to be used:
http://code.google.com/appengine/docs/python/tools/devserver.html#Using_Mail
Robin
On Sep 17, 11:02 pm, notcourage klr...@gmail.com wrote:
I can send email after deploying to gae but not in the dev env.
I need to be able to compare another password submitted against the
one in that field. How would I go about doing that? What functions are
available in web2py for this.
db.define_table('pass',
SQLField(password, 'password', readable=False, label='Password',
requires=CRYPT()))
I.e. I have just
On Sep 18, 2009, at 4:44 PM, waTR wrote:
I need to be able to compare another password submitted against the
one in that field. How would I go about doing that? What functions are
available in web2py for this.
db.define_table('pass',
SQLField(password, 'password', readable=False,
A friend of mine Garrett Smith from Chipy run the following tests on
his machine (not sure what it is):
RPS = requests per second
Time = average time in milliseconds to server each request
Benchmark = `ab -t 10 -c number of concurrent requests-r http://localhost`
100 Concurrent Requests
Here (*) means this web server:
http://web2py.com/examples/static/web2pyserver.py
which is NOT included in web2py and does NOT uses web2py. In all cases
the test refere to a bare bone hello world application. Sorry for the
confusion.
Massimo
On Sep 18, 8:47 pm, mdipierro
thanks to the instructions on the book and the example
web2py_wsgi.conf, i now can run web2py with mod_wsgi on apache. admin
with https worked fine, too, but i had to comment out the lines
if request.env.remote_addr!=request.env.http_host.split(':')[0]:
raise HTTP(400)
in models/appadmin.py.
40 matches
Mail list logo