Re: [web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread Roberto De Ioris
> Compiled uwsgi 0.9.9.3 (the 0.9.8.1 did not now about pythonpath) > uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http :80 -s > /tmp/we2py.sock >uwsgi.log 2>&1 > > 1 CPU: 17.83 [#/sec] (better than rocket) > 2 CPUs: 17.98 [#/sec] > > uwsgi --pythonpath /opt/web-apps/web2py --mod

[web2py] Re: CMS idea

2011-12-11 Thread Massimo Di Pierro
And here is the full source https://github.com/mdipierro/Plasmid On Dec 11, 11:14 pm, Massimo Di Pierro wrote: > I made a better version and I made a video about it: > > http://vimeo.com/33513600 > > Massimo > > On Dec 10, 10:55 am, Massimo Di Pierro > wrote: > > > > > > > > > notice that every

[web2py] Image broken in exported CSV

2011-12-11 Thread Saurabh S
Hi , I have a table in my application , i have an image colomn in that table which stores images. when i export the table via /appadmin, the image field appears to be broken/in some format which is not readable. How can i export the image as it is (in the same format is it was stored) ? Please

[web2py] Image broken in exported CSV

2011-12-11 Thread Saurabh S
Hi , I have a table in my application , i have stored a image field in one column of that table. but when i export the table via /appadmin, the image field appears to be broken/in some format which is not readable. How can i export the image as it is ? Please provide suggestions.

[web2py] Re: CMS idea

2011-12-11 Thread Massimo Di Pierro
I made a better version and I made a video about it: http://vimeo.com/33513600 Massimo On Dec 10, 10:55 am, Massimo Di Pierro wrote: > notice that every "edited" page gets its own new url... with minor > changes one could make it edit its own pages and display a list of > pages edited by the sa

[web2py] Re: 500 internal server error after deployment of app and upgrade to latest version

2011-12-11 Thread Massimo Di Pierro
No we do not. On Dec 11, 10:55 pm, Anthony wrote: > I don't think web2py supports Python 2.4 any more. > > > > > > > > On Sunday, December 11, 2011 11:45:55 PM UTC-5, Adnan Smajlovic wrote: > > > I switched several times between the old and the latest version of web2py, > > and the old version wo

[web2py] Re: weird database behavior

2011-12-11 Thread Anthony
Yes, but exactly how are you accessing it? Show your model code, how you are updating the data, and how you are then querying and displaying it. On Sunday, December 11, 2011 11:23:39 PM UTC-5, ニコノコ wrote: > > I meant, if the data is accessed from a function. > > On Dec 12, 12:07 pm, Anthony wrot

[web2py] Re: 500 internal server error after deployment of app and upgrade to latest version

2011-12-11 Thread Anthony
I don't think web2py supports Python 2.4 any more. On Sunday, December 11, 2011 11:45:55 PM UTC-5, Adnan Smajlovic wrote: > > I switched several times between the old and the latest version of web2py, > and the old version works fine in my environment, but the new one is giving > the internal se

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread Anthony
On Sunday, December 11, 2011 1:53:11 PM UTC-5, tsvim wrote: > > db.define_table('table_settings', > Field('name','string'), > Field('default_value','string')) > > db.define_table('data', > > Field('parent_table',db.table_settings,writable=False,reada

[web2py] 500 internal server error after deployment of app and upgrade to latest version

2011-12-11 Thread Adnan Smajlovic
I switched several times between the old and the latest version of web2py, and the old version works fine in my environment, but the new one is giving the internal server error. The old version is Version 1.94.3 (2011-03-17 20:22:37) I know my version of Python is 2.4.3, but Host Gator was not

[web2py] Re: read once definitions - development vs. production

2011-12-11 Thread Constantine Vasil
Thank you , Massimo!

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread ニコノコ
SOrry, email editor mangled the text. SHould read: db.table_settings['parent_table'].default_value.default On Dec 12, 12:21 pm, Nik Go wrote: > db.table_settings.default_value.requires = IS_IN_SET(['a','b']) > db.table_settings['parent_table'].default_value*.default* > > I think this is what you

[web2py] Re: weird database behavior

2011-12-11 Thread ニコノコ
I meant, if the data is accessed from a function. On Dec 12, 12:07 pm, Anthony wrote: > Can you show some code? What do you mean "check the data from a view"? > > > > > > > > On Sunday, December 11, 2011 8:43:50 PM UTC-5, ニコノコ wrote: > > > I have a custom auth_user field that I could edit from ad

Re: [web2py] Getting table a to use as default string from field in table b

2011-12-11 Thread Nik Go
db.table_settings.default_value.requires = IS_IN_SET(['a','b']) db.table_settings['parent_table'].default_value*.default* I think this is what you want, but make sure that you assign your validators first in your table_settings, because otherwise they're empty (or properly, None) On Monday, Dece

Re: [web2py] Re: FluxFlex New Version Issue

2011-12-11 Thread Ismael Serratos
In fact, I'm trying to create new projects, and new appliances of web2py and with all happens the same.. http://kodesideman.fluxflex.com/ the new one, same error, and the old one kodeside.fluxflex.com now I'm getting a quota limit error. I'm wondering if is a fluxflex issue. I've already send them

[web2py] Re: weird database behavior

2011-12-11 Thread Anthony
Can you show some code? What do you mean "check the data from a view"? On Sunday, December 11, 2011 8:43:50 PM UTC-5, ニコノコ wrote: > > I have a custom auth_user field that I could edit from admin (and I can > verify that changes are actually written in the sqlite table) but every > time I check t

Re: [web2py] Re: FluxFlex New Version Issue

2011-12-11 Thread ochiba77
Hm... I've never seen this error before. Is this your welcome app and you said it's just installed ? If you haven't done anything maybe you can reinstall from scratch. Sent from my Verizon Wireless BlackBerry -Original Message- From: Ismael Serratos Sender: web2py@googlegroups.com Date:

Re: [web2py] Re: FluxFlex New Version Issue

2011-12-11 Thread Ismael Serratos
Now I'm having another issue, it doesn´t load anything, it was working but now when I get into my url http://kodeside.fluxflex.com I get a server error. On Sun, Dec 11, 2011 at 9:35 PM, wrote: > ** > Ismael, > > You need to access by https and password is your mysql password. This > instruction

Re: [web2py] Re: FluxFlex New Version Issue

2011-12-11 Thread ochiba77
Ismael, You need to access by https and password is your mysql password. This instruction should be written in readme. Sent from my Verizon Wireless BlackBerry -Original Message- From: Ismael Serratos Sender: web2py@googlegroups.com Date: Sun, 11 Dec 2011 20:27:30 To: Reply-To: web2p

Re: [web2py] Re: FluxFlex New Version Issue

2011-12-11 Thread Ismael Serratos
And how can I do that? =( Sorry I've never used fluxflex. On Sun, Dec 11, 2011 at 8:18 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > You need to run it from shell once so that it creates the password > file. > > On Dec 11, 8:14 pm, Ismael Serratos wrote: > > HI!! I just install

[web2py] Re: FluxFlex New Version Issue

2011-12-11 Thread Massimo Di Pierro
You need to run it from shell once so that it creates the password file. On Dec 11, 8:14 pm, Ismael Serratos wrote: > HI!! I just installed web2py on fluxlflex and I noticed it is the new > web2py version (best for me :D). > > But just after installing it I tried to go to the admin interface and

[web2py] FluxFlex New Version Issue

2011-12-11 Thread Ismael Serratos
HI!! I just installed web2py on fluxlflex and I noticed it is the new web2py version (best for me :D). But just after installing it I tried to go to the admin interface and I get this error: "admin disabled because unable to access password file" Thanks!!

[web2py] Re: weird database behavior

2011-12-11 Thread Nik Go
And the other fields are still set to "none", while their true values are otherwise. On Monday, December 12, 2011, Nik Go wrote: > > Here's a screenshot. Noticed that i edited the name to"GJonathan" but the > response.flash retrieves it as "Jonathan" > > On Monday, December 12, 2011, Nik Go wrot

[web2py] weird database behavior

2011-12-11 Thread Nik Go
I have a custom auth_user field that I could edit from admin (and I can verify that changes are actually written in the sqlite table) but every time I check the data from a view, the field value is always set to the initial default values, and not whatever's actually stored in the table. It's like

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread Anthony
Massimo, shortly I'll be sending an updated 'examples' that fixes this as well as some other issues (courtesy of Chris May). The Bossie Award problem is resolved by moving the .announce div outside the statusbar div (perhaps it was nested inadvertently). Anthony On Sunday, December 11, 2011 3:

[web2py] Re: auth.requires_membership('admin') in templates

2011-12-11 Thread Anthony
The various auth.requires... functions are strictly decorators. If you just need to test for membership, do: {{if auth.has_membership('admin'):}} See http://web2py.com/book/default/chapter/08#Authorization. Anthony On Sunday, December 11, 2011 6:22:20 PM UTC-5, Vincenzo Ampolo wrote: > > Hi,

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
Compiled uwsgi 0.9.9.3 (the 0.9.8.1 did not now about pythonpath) uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http :80 -s /tmp/we2py.sock >uwsgi.log 2>&1 1 CPU: 17.83 [#/sec] (better than rocket) 2 CPUs: 17.98 [#/sec] uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandle

[web2py] Re: auth.requires_membership('admin') in templates

2011-12-11 Thread Vincenzo Ampolo
On 12/12/2011 12:22 AM, Vincenzo Ampolo wrote: Hi, is there a way to use auth.requires_membership('admin') in templates? i tried : {{if auth.requires_membership('admin'):}} Admin {{pass}} I mean it didn't work because of this : because : print auth.requires_membership('admin

[web2py] auth.requires_membership('admin') in templates

2011-12-11 Thread Vincenzo Ampolo
Hi, is there a way to use auth.requires_membership('admin') in templates? i tried : {{if auth.requires_membership('admin'):}} Admin {{pass}} because : print auth.requires_membership('admin') How can i use auth.* ACs in templates? thanks. -- Vincenzo Ampolo htt

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread peter
Any chance of trying uwsgi on its own, something like this uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http : 80 -s /tmp/we2py.sock Thanks Peter On Dec 11, 1:10 pm, rif wrote: > In the same environment I tested nginx configuration: > > nginx: 1.0.10 > uwsgi: 0.9.8.1 > > ab -n

[web2py] Re: server settings.

2011-12-11 Thread ron_m
I have recorded what might be a similar problem. If I run the application using the rocket server where the client browser and server are on the same LAN the application works. If I have the client come in from another location over a VPN I get partial pages. The Safari archive in the failure c

[web2py] Re: read once definitions - development vs. production

2011-12-11 Thread Massimo Di Pierro
No. code in models is executed at every request. Code in modules is importent only once and cached. It is executed when functions in the module are called (as in normal python). On Dec 11, 2:51 pm, Constantine Vasil wrote: > Just to confirm: > > If I put a code in /modules folder is it imported e

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread Massimo Di Pierro
Does this work? .announce { clear:both;position:absolute;align:center;color:white;top: 120px;font-weight:bold;text-align:center;} your proposed chance breaks it for me with chrome. On Dec 11, 12:11 pm, Jim Gregory wrote: > Changing the "announce" class specification on line 13 in examples.css >

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread Massimo Di Pierro
I understand and it is very much appreciated. I will correct it. massimo On Dec 11, 10:15 am, rif wrote: > This comparison was intended to help writing the why web2py paragraph from > the book (https://groups.google.com/d/topic/web2py/29jdfjejwZo/discussion)

[web2py] Re: read once definitions - development vs. production

2011-12-11 Thread Constantine Vasil
Just to confirm: If I put a code in /modules folder is it imported every time on each function request? I want it imported on demand only when I need it.

[web2py] Re: read once definitions - development vs. production

2011-12-11 Thread Constantine Vasil
Thank you, I tested it and it works both ways.

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread tsvim
db.define_table('table_settings', Field('name','string'), Field('default_value','string')) db.define_table('data', Field('parent_table',db.table_settings,writable=False,readable=False), Field('datetime','datetime',default=request.now

[web2py] Re: How to remove 'Registration needs verification'?

2011-12-11 Thread Constantine Vasil
I see in GAE Database Viewer in reset_password_key that there are some value - not sure if it will ask again for 'Registration needs verification' auth.settings.registration_requires_verification = False I define user tabble as follows: from gluon.tools import Auth set

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread Anthony
Sorry, not sure exactly what you mean? Can you provide more detail -- maybe show some code? On Sunday, December 11, 2011 1:35:35 PM UTC-5, tsvim wrote: > > Obviously you're right. I realized later that I needed to re-think what I > was trying to do. > The id of current user is stored in the data

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread tsvim
Obviously you're right. I realized later that I needed to re-think what I was trying to do. The id of current user is stored in the data table. Is there a way I can refernce that field in the line you gaveme? Thanks for all your help.

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread Jim Gregory
Changing the "announce" class specification on line 13 in examples.css from : .announce { position:absolute;align:center;color:white;top:120px;font- weight:bold;text-align:center;} to: .announce {clear:both;color:white;top:120px;font-weight:bold;text- align:center;} takes care of the problem for

Re: [web2py] Re: routers only exposing default controller

2011-12-11 Thread Jonathan Lundell
On Dec 11, 2011, at 9:39 AM, Anthony wrote: > It might be sufficient to just reload routes.py, which you can do via a > button in 'admin', or via a call to URL('admin', 'default', 'reload_routes'), > or via: > > import gluon.rewrite > gluon.rewrite.load() Yes, anything that reloads the routing

[web2py] Re: routers only exposing default controller

2011-12-11 Thread Anthony
It might be sufficient to just reload routes.py, which you can do via a button in 'admin', or via a call to URL('admin', 'default', 'reload_routes'), or via: import gluon.rewrite gluon.rewrite.load() Anthony On Sunday, December 11, 2011 12:04:41 PM UTC-5, Olympus Runner wrote: > > > I have the

Re: [web2py] Re: routers only exposing default controller

2011-12-11 Thread Jonathan Lundell
On Dec 11, 2011, at 9:04 AM, Olympus Runner wrote: > > I have the following setup > http://groups.google.com/group/web2py/browse_thread/thread/b4df60e75f0d64fb > This is my routes.py file: > # > routers = dict( BASE = dict( domains = { >

[web2py] Re: username and email login (auth)

2011-12-11 Thread Anthony
Sorry, good catch. On Sunday, December 11, 2011 11:30:12 AM UTC-5, Francisco Costa wrote: > > Gotta after some debugging: post_vars was missing > > So this will verification will work for username or email login: > > if request.vars.username and not IS_EMAIL() > (request.vars.username)[1]:

[web2py] Re: routers only exposing default controller

2011-12-11 Thread Olympus Runner
I have the following setup http://groups.google.com/group/web2py/browse_thread/thread/b4df60e75f0d64fb This is my routes.py file: # routers = dict(     BASE = dict(         domains = {             'mymanager.example.com': 'mymanager',             'test.example.c

[web2py] Re: username and email login (auth)

2011-12-11 Thread Francisco Costa
Gotta after some debugging: post_vars was missing So this will verification will work for username or email login: if request.vars.username and not IS_EMAIL() (request.vars.username)[1]: auth.settings.login_userfield = 'email' request.vars.email = request.vars.user

[web2py] Re: server settings.

2011-12-11 Thread Massimo Di Pierro
There is a program called wireshark. It allows to record network traffic and save it to a file. Assuming you run rocket/web2py on port 8000. you can tell it to record all traffic to and from port 8000, then run the dowload that fails. Dump the wireshark recording to a file and send it to me. Wiresh

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
This comparison was intended to help writing the why web2py paragraph from the book (https://groups.google.com/d/topic/web2py/29jdfjejwZo/discussion )

[web2py] Re: server settings.

2011-12-11 Thread Mchurch
Of course! The problem is to understand what You are asking me to do... :) On Dec 11, 4:38 pm, Massimo Di Pierro wrote: > Is there any ways you can do a packet capture and record what is going > on when you use Opera and Rocket? > > If we can get some data should be an easy fix. > > On Dec 11, 3:

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread Massimo Di Pierro
Python multithreaded programs (all of them, including rocket and mod_wsgi) decrease performance the more CPUs you have. This is because of the GIL. It is a well known problem and, in view, the biggest problem with Python. In the case of apache, to improve things, you have to configure apache to run

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread Massimo Di Pierro
we abandoned ez-css. we are not abandoning mercurial. Just replacing bzr with git. On Dec 11, 5:11 am, "ma...@rockiger.com" wrote: > The new home page looks very nice. > > Means this web2py is leaving ez-css und mercurial behind? > I am just asking because of my introductory book to web developm

[web2py] Re: server settings.

2011-12-11 Thread Massimo Di Pierro
Is there any ways you can do a packet capture and record what is going on when you use Opera and Rocket? If we can get some data should be an easy fix. On Dec 11, 3:44 am, Mchurch wrote: > Thanks Massimo, I resolve it immediately after Your suggestions using > Tornado. > Rocket allows images unt

[web2py] Re: How to show user_id encrypted in the browser address bar and decrypt in the app?

2011-12-11 Thread Anthony
You might also consider using URL(..., user_signature=True) and @auth.requires_signature: http://web2py.com/book/default/chapter/04#Digitally-signed-URLs. That will further ensure that the URL itself has not been tampered with (i.e., no args or vars have been altered). Anthony On Sunday, Dece

[web2py] limiting web2py to my LAN in order to expose secure access to /admin & /appadmin

2011-12-11 Thread web-dev-m
Dear Everyone, I am closing in on a finished web2py application that I will eventually launch to the web (woo hoo!) I am using Debian/Apache2 and I want to expose it only to my LAN so I can do a mini-launch and test it with some other developers that VPN in. I understand that this is primarily an

[web2py] Re: How to show user_id encrypted in the browser address bar and decrypt in the app?

2011-12-11 Thread Anthony
Unless you change the encryption key every time, the encrypted id would still always be the same, so could still be stolen and used. Instead, you might simply want to confirm that the id in request.vars matches the id of the current logged in user. Anthony On Sunday, December 11, 2011 2:57:01

[web2py] Re: read once definitions - development vs. production

2011-12-11 Thread Anthony
On Saturday, December 10, 2011 11:29:49 PM UTC-5, Constantine Vasil wrote: > > I just put my classes in site-packages/models.py > > and the 'from models import *' made the classes available globally. > > So if I put them in /modules/models.py it would be the same? > It should work the same -- le

[web2py] pack application from other script

2011-12-11 Thread Alex
I have a python deployment script where I update the build info (build nr., build date), compile the application, pack it and finally upload it to a server. The script is in a location independent of web2py. I can compile the application with: sys.path.append(web2py_dir) os.chdir(web2py_dir) impor

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
And now the weirdest thing: Enabling two CPUs on the virtual machine gave me the following weird results: nginx: 31.92 [#/sec] apache: 10.63 [#/sec] rocket: 10.36 [#/sec] So 1000 request with a concurrency of 20 on 2 CPUs actually slows down apache and rocket. I thought that apache and rocket

[web2py] How to make sqlite database queries from a regular python shell

2011-12-11 Thread Saurabh Kumar
Hi, I am trying to make database queries to my app database (sqlite) which resides in .../applications/app/databases folder. I am importing DAL package to achieve this. What address should I write in the following command to make it connect to the app database.. db=DAL('sqlite://storage.sqlite

[web2py] Re: username and email login (auth)

2011-12-11 Thread Francisco Costa
has anyone successfully tried this? On Dec 9, 6:01 pm, Francisco Costa wrote: > No error, > it enters in the if loop, but it seems that the > auth.settings.login_userfield = 'email' doesn't change anything > > On Dec 9, 5:34 pm, Anthony wrote: > > > > > The idea is to create the form with the '

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
In the same environment I tested nginx configuration: nginx: 1.0.10 uwsgi: 0.9.8.1 ab -n1000 -c20 http://192.168.122.187/welcome/default/index This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Sof

[web2py] Rocket vs mod_wsgi

2011-12-11 Thread rif
Environment machine: libvirt kvm instance: *512Mb 1cpu* on a acer aspire 5100 laptop os: ubuntu 11.10, mod_wsgi3.3 web2py: 1.99.3 apache config: default resulted from scripts/setup-web2py-ubuntu.sh Rocket: v1.2.4 python web2py.py -Na test -i 0.0.0.0 Commands: - run from the host system ab -n100

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread ma...@rockiger.com
The new home page looks very nice. Means this web2py is leaving ez-css und mercurial behind? I am just asking because of my introductory book to web development featuring web2py and don't wanna present obsolete solutions.

[web2py] Re: book: why web2py

2011-12-11 Thread rif
I can do that:. Is the following environment relevant? - ubuntu 11.10 on a kvm virtual instance (mod_wsgi 3.3 - latest) - web2py with the default setup from scripts/setup-web2py-ubuntu.sh - ab -n1000 -c20 http://localhost/ and ab -n1000 -c20 http://localhost:8000/ I also have to report two public

[web2py] Re: server settings.

2011-12-11 Thread Mchurch
Massimo, how (where) can I change the default web server? I can't find it in posts... On 11 Dic, 10:44, Mchurch wrote: > Thanks Massimo, I resolve it immediately after Your suggestions using > Tornado. > Rocket allows images until 123KB, not over in my case. > The issue shows up with both Opera m

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread Stefan Scholl
This was just a on the fly test in Firebug. And it doesn't feel right to insert some random BR in there. Oh, how I hate floats. You can't do without them and then something random happens ... Massimo Di Pierro wrote: > Can you emailed me the fixed layout.html? > > On Dec 10, 6:02 pm, Stefan S

[web2py] Re: server settings.

2011-12-11 Thread Mchurch
Thanks Massimo, I resolve it immediately after Your suggestions using Tornado. Rocket allows images until 123KB, not over in my case. The issue shows up with both Opera mobile and android stock browser. I've lost my brain in it yesterday, thanks!! My best compliments for Your work. On 11 Dic, 07:1

[web2py] Re: read once definitions - development vs. production

2011-12-11 Thread Vineet
As Anthony pointed out rightly, if you need that module for a specific app, then put it in modules folder. If that module is required to be imported in other apps as well, then put it in site-packages folder. HTH -- Vineet On Dec 11, 9:29 am, Constantine Vasil wrote: >  I just put my classes in

Re: [web2py] Re: Massimo

2011-12-11 Thread VIREN PATEL
Hatsoff to Massimo for all continuous help !! On Thu, Dec 8, 2011 at 9:28 PM, Chris May wrote: > I second that! > > We are truly blessed to have so many great, patient and > available contributors to the code and the community! > > > Anthony, do you have the book memorized yet? :D >