On 14 sep, 14:24, mdipierro 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:
>
> auth.add_permission('run_this',group_id=id.group('
On 14 sep, 14:24, mdipierro 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:
>
> auth.add_permission('run_this',group_id=id.group('
Line 215:
self.socket=ssl_interface(self.socket)
should be:
self.socket=self.ssl_interface(self.socket)
I presume.
What version of wsgiserver are you basing this off of? I remember
that a previous version of wsgiserver was using deprecated socket APIs
and could not be e
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 of
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 wrote:
> This is a complete rewrite of wsgiserver. All functions are different.
> This is trivial to port to Python 3 and/or lightwe
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 wrote:
> IMHO, concurrency is more important than raw speed. In
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 wha
On 18 sep, 15:03, Fred wrote:
> 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
Yes
> table, are the "table_name" column values blank?
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:
{{=db.secao[session.secao].nome}}
{{=form_voltar}}
Massimo I tried to run standalone and I recived this:
E:\web2py\gluon>python web2pyserver.py 8001
Traceback (most recent call last):
File "web2pyserver.py", line 260, in
s=web2pyWSGIServer('127.0.0.1:'+sys.argv[1],test_wsgi_app,min_threads=5,max_
threads=10)
TypeError: __init__() got an
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 wrote:
> Massimo I tried to run standalone and I recived this:
>
> E:\web2py\gluon>
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
web2py+unsubscr
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\bin>ab -n 1 http://127.0.0.1:8001/
This is ApacheBench, Version 2.3 <$Revi
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 suppor
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 f
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 wrote:
> Hello,
>
> Maybe it's something obvious, but can not find th
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
wrote:
> Hi,
>
> I have two apps in my Web2Py:
>
> init - default website.
> blog - my personal blog.
>
>
On Sep 17, 3:29 am, mdipierro 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:
subfolder/name instead of table
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 NAME)]
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 t
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=''),
db.Field('last_name'
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 gro
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
On Sep 18, 2:39 pm, eddwinston 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
--~--~-~--~~~---~--~~
You received this
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 wrote:
> 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 u
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 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 wrote:
>
> > Hello mate I have a small issue here.. I'm using the latest web2py
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 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 I upload a pic
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 wrote:
> On 18 sep, 18:02, mdipierro wrote:
>
> > You have..:
>
> > if len(requ
Hi,
But just using {{=form.hidden_fields()}} does not generate a form key
On Sep 18, 10:56 pm, mdipierro wrote:
> {{=form.hidden_fields()}}
>
> will create the
>
> On Sep 18, 2:39 pm, eddwinston wrote:
>
> > Hi,
>
> > If I create a form on the view and not from the controller action, how
Do you have a
form=FORM()
return dict(form=form)
in your controller
I just tried it and I get this:
{{=wes}}
On Fri, Sep 18, 2009 at 3:35 PM, eddwinston wrote:
>
> Hi,
>
> But just using {{=form.hidden_fields()}} does not generate a form key
>
> On Sep 18, 10:56 pm, mdipierro wrote:
>
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 wrote:
> On Thu, Sep 17, 2009 at 10:55 AM, Thadeus Burgess
> wrote:
>
> > I have tried this many different ways and have yet to b
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 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 -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 wrote:
> A friend of
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.
i
The latest rev1232 introduces a sneaky web server, but it seems not
exist?
File "C:\DOWNLOAD\web2py-trunk\gluon\main.py", line 32, in
import sneaky
ImportError: No module named sneaky
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi Wes,
That was not what i meant, I want to creat the form on the view and
not in the action. I created initialised an SQLFORM object but wont
return it to the view because i want to create my own form. I only use
the _formname to identify the form for processing. But I want a
_formkey on this f
It seems to be in the tree:
http://bazaar.launchpad.net/~mdipierro/web2py/devel/files/head%3A/gluon/
When I get the update from launchpad, it seems to be running just fine...
On Sat, Sep 19, 2009 at 1:15 AM, Iceberg wrote:
>
> The latest rev1232 introduces a sneaky web server, but it seems not
46 matches
Mail list logo