[web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2011-03-28 Thread pbreit
Updated. + client_max_body_size 10m; (worried about making it higher since opens up easy DOS attack) + prompt for admin password at beginning

[web2py] Setup Script: Ubuntu + Cherokee + uWSGI

2011-03-28 Thread pbreit
Here's a script to install Cherokee. The problem with Cherokee is that while it has a very nice admin front-end, it's not set up well for automating install and config. The approach I use here is to append a snippet of configs to the cherokee.conf file. It seems to work fine. + Tested on

Re: [web2py] From cherokee (uwsgi) to nginx (uwsgi)

2011-03-28 Thread Vasile Ermicioi
this config is for uswgi, no matter what server you use, just be sure to pass it to uwsgi when you will start it http://projects.unbit.it/uwsgi/wiki/Doc#TheXMLconfigurationfile

[web2py] Re: Setup Script: Ubuntu + Cherokee + uWSGI

2011-03-28 Thread pbreit
Typo: $ wget http://bitbucket.org/pbreit/web2py-automation/raw/tip/setup-ubuntu-cherokee.shhttp://bitbucket.org/pbreit/web2py-automation/raw/tip/setup-ubuntu-nginx.sh

[web2py] Re: squeeze + Apache2 = lots of RAM

2011-03-28 Thread selecta
Anybody is using Apache2 with Debian 6? I just upgraded from Debian 5 to 6, and notice an obscene amount of memory taken by Apache2, which almost 600MB.   Unbelievable.   In Debian 5, it took about 300MB. I tried this setup on my virtual machine server (256MB ram) and i could not get web2py

Re: [web2py] Re: getting fields created by SQLFORM but which are not in the form

2011-03-28 Thread Martín Mulone
if form.accepts(request.vars, session, onvalidation=get_uuid): vars['poster_name'] = form.vars.poster_name vars['poster_email'] = form.vars.poster_email redirect(URL('post_email', vars=vars)) if form.accepts(request.vars, session, onvalidation=get_uuid):

[web2py] Re: web2py 1.94.6

2011-03-28 Thread kenji4569
The virtualfields functionality with join query dosen't work in 1.94.6 while it works in 1.94.5, as follows: t1 = db.define_table('t1', Field('val', 'integer')) t2 = db.define_table('t2', Field('t1', db.t1), Field('val', 'integer')) class VirtualFields(object): ... def val2(self): ...

[web2py] A way to disable totally auto migration ?

2011-03-28 Thread Alexandre Strzelewicz
I have recurrent problems with auto-migration. Is there a way to totally disable migration on all tables ? Thanks

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread Dale DeWitt
That's odd that I had to command cp parameters_443 parameters_80 to administratively login.

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread Dale DeWitt
Correction: I can only get to the inner login form. Internal Error. Traceback (most recent call last): File /var/web2py/gluon/main.py, line 481, in wsgibase session._try_store_on_disk(request, response) File /var/web2py/gluon/globals.py, line 453, in _try_store_on_disk

[web2py] Re: From cherokee (uwsgi) to nginx (uwsgi)

2011-03-28 Thread Jose
On 28 mar, 04:10, Vasile Ermicioi elff...@gmail.com wrote: this config is for uswgi, no matter what server you use, just be sure to pass it to uwsgi when you will start it http://projects.unbit.it/uwsgi/wiki/Doc#TheXMLconfigurationfile I have my own config.xml working fine in Cherokee, the

[web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2011-03-28 Thread VP
Can you make it a little more general by having two variables; one for the location of web2py installation, and the other for the user running web2py, nginx and uwsgi. The default values can be /var/opt and www-data, but sometimes other things are preferable. On Mar 28, 2:03 am, pbreit

[web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread AdamF
Hi Kevin, Thanks for answer. I agree that for multipage wizards usually session should be OK. However I can give you two cases from my past projects that are not so easy (developed in java anyway). OK, its not just a wizard - but the problem is the same. a) There were an analytical

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Anthony
I'm not sure there's any way to disable all migrations without setting the 'migrate' argument in each table definition. However, if you want to easily switch migrations on and off for all tables at once, you can do that by defining a 'migrate' variable. Note, model files are run in alphanumeric

[web2py] Re: web2py 1.94.6

2011-03-28 Thread Massimo Di Pierro
This is a bug! Thanks for reporting it. Please open a ticket on google code. Massimo On Mar 28, 4:51 am, kenji4569 hos...@s-cubism.jp wrote: The virtualfields functionality with join query dosen't work in 1.94.6 while it works in 1.94.5, as follows: t1 = db.define_table('t1', Field('val',

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Jose
On 28 mar, 07:13, Alexandre Strzelewicz strzelewicz.alexan...@gmail.com wrote: I have recurrent problems with auto-migration. Is there a way to totally disable migration on all tables ? Thanks db = DAL(..., migrate=False) Jose

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Anthony
On Monday, March 28, 2011 9:53:54 AM UTC-4, Jose wrote: On 28 mar, 07:13, Alexandre Strzelewicz strzelewic...@gmail.com wrote: I have recurrent problems with auto-migration. Is there a way to totally disable migration on all tables ? Thanks db = DAL(..., migrate=False)

[web2py] Re: web2py 1.94.6

2011-03-28 Thread Massimo Di Pierro
Are you sure this exact code worked before? On Mar 28, 4:51 am, kenji4569 hos...@s-cubism.jp wrote: The virtualfields functionality with join query dosen't work in 1.94.6 while it works in 1.94.5, as follows: t1 = db.define_table('t1', Field('val', 'integer')) t2 = db.define_table('t2',

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Jose Jachuf
2011/3/28 Anthony abasta...@gmail.com: On Monday, March 28, 2011 9:53:54 AM UTC-4, Jose wrote: On 28 mar, 07:13, Alexandre Strzelewicz strzelewic...@gmail.com wrote: I have recurrent problems with auto-migration. Is there a way to totally disable migration on all tables ? Thanks db

Re: [web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread Dave Warnock
Adam, I am quite surprised that the database administrator was happy with you using a transaction in that way. It goes against the normal practice that a database should never be stalled mid transaction while waiting for user input. If you have a table locking database this will mean the

[web2py] Restriction Fields

2011-03-28 Thread luifran
I have the following table, for example: db.define_table ('t', Field ('a '), Field ('b')) I want to impose the following restriction, to avoid insertion of duplicate records not allow insertion of a pair of identical values (a y b)​​. How I can do this?, I know how to restrict a single field, but

[web2py] Re: Restriction Fields

2011-03-28 Thread Massimo Di Pierro
db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!= %s'% repr(request.vars.a))) On Mar 28, 10:37 am, luifran lbernalhernan...@yahoo.es wrote: I have the following table, for example: db.define_table ('t', Field ('a '), Field ('b')) I want to impose the following

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Anthony
Massimo, What is the exact behavior of DAL(..., migrate=False)? Does setting 'migrate' in the DAL connection always override the 'migrate' arguments in the individual table definitions associated with that connection? For example, if you have db=DAL(..., migrate=True), will that cause

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Massimo Di Pierro
I am looking at the source code right now. Currently this does not override the behavior of individual define_table(s). It just provides the default behavior in case a migrate argument is not passed. Since this is undocumented bahviour it can be changed and, the more I think about it, the more I

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread pbreit
Try deleting all your sessions.

Re: [web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread Fiuk, Adam
Hi Dave, Thanks for the answer and hints, I will analyze it deeper later, but to answer you now - please make sure you know the person before you suggest him buying a book ;) I am working currently on RDBMS with terrabytes of data, up to 2-3 thousands concurrent users and I have to live with many

[web2py] Verify Email Subject

2011-03-28 Thread Benjamin
Hi, I'm very new to Web2Py. I have modified db.py with: auth.messages.verify_email = Thttps://admin.3methods.com/examples/global/vars/T (*my message)* * * Now I would like to change the subject line, but cannot figure out how to do so. Thanks for any help! I'm really liking Web2Py.

[web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread Massimo Di Pierro
Technically you can ask web2py not to close a db connection and store the connection in cache ram so that another request would pick it up. Yet I cannot recommend anybody doing this. It keeps the database locked, at least the records that are being modified will be locked until commit, resulting

[web2py] Re: Verify Email Subject

2011-03-28 Thread Massimo Di Pierro
Welcome Benjamin. auth.messages.verify_email_subject = ... On Mar 28, 12:24 pm, Benjamin ben2...@gmail.com wrote: Hi, I'm very new to Web2Py.  I have modified db.py with: auth.messages.verify_email = Thttps://admin.3methods.com/examples/global/vars/T (*my message)* * * Now I would like

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread dewittdale
I use '/etc/cherokee/ssl/server.pem' and /etc/cherokee/ssl/server.pem in the default Certificate and Certificate Key slots doing a complete kill of the vServers and Sources and 443 port add. Save and hard restart. I can login but when I try to go to the admin interface I get the exact same

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread pbreit
Hmmm... How about making sure that parameters_443.py has the same ownership as the other files? Are all the other files owned by www-data:www-data? Then: chown www-data:www-data parameters_443.py You might even chown the whole web2py directory: $ cd /var #path to directory that

[web2py] Re: Verify Email Subject

2011-03-28 Thread Benjamin
Awesome, thanks!

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread dewittdale
chown -R www-data:www-data web2py I was hesitant but did it anyway . . . and it worked. I wonder if the non original clone of parameters_443.py parameters_80.py file is superfluous. Nice to see progress. Thanks. On Mon, Mar 28, 2011 at 12:41 PM, pbreit pbreitenb...@gmail.com wrote:

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread pbreit
The 443 file is definitely required if you are trying to log in to admin via HTTPS.

[web2py] Re: web2py cherokee vanilla

2011-03-28 Thread pbreit
The 80 file is needed if you are trying to log in to admin via http://localhost; or http://127.0.0.1;.

[web2py] crud initial value

2011-03-28 Thread CVstash dot com
Hello, I've constructed a table in the model with an owner field. I wish it to always default to the logged in user id being auth.user.id. I tried setting it as default, as in: Field('owner', 'reference auth_user', readable=False, writable=False, default=auth.user.id), problem is logging out

Re: [web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread David Warnock
Adam, Thanks for the answer and hints, I will analyze it deeper later, but to answer you now - please make sure you know the person before you suggest him buying a book ;) I am working currently on RDBMS with terrabytes of data, up to 2-3 thousands concurrent users and I have to live with many

[web2py] Re: crud initial value

2011-03-28 Thread Massimo Di Pierro
Instead of default=auth.user.id, use default=auth.user_id It is set to None if no user is logged in. On Mar 28, 1:19 pm, CVstash dot com cvst...@gmail.com wrote: Hello, I've constructed a table in the model with an owner field. I wish it to always default to the logged in user id being

[web2py] Re: crud initial value

2011-03-28 Thread CVstash dot com
Felt like a gotcha but worked like a charm. Thanks! On Mar 29, 2:24 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Instead of default=auth.user.id, use default=auth.user_id It is set to None if no user is logged in. On Mar 28, 1:19 pm, CVstash dot com cvst...@gmail.com wrote:

Re: [web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread pbreit
I agree. You don't have to obey your framework but it sure makes things easier.

[web2py] Re: Restriction Fields

2011-03-28 Thread luifran
Thanks, I'll try that way On Mar 28, 8:59 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!= %s'% repr(request.vars.a))) On Mar 28, 10:37 am, luifran lbernalhernan...@yahoo.es wrote: I have the following

[web2py] Do we have any Turbogears to web2py model migration script?

2011-03-28 Thread Tito Garrido
Hi Folks, I have a system running on turbogears with a lot of databases definitions, I'm wondering if we have a script that is able to generate a web2py model from a turbogears model... Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__(

[web2py] Re: Do we have any Turbogears to web2py model migration script?

2011-03-28 Thread Massimo Di Pierro
Does it use SQLAlchemy or SQLObject? If SQLAlchemy this may work: http://www.web2py.com/AlterEgo/default/show/189 On Mar 28, 1:52 pm, Tito Garrido titogarr...@gmail.com wrote: Hi Folks, I have a system running on turbogears with a lot of databases definitions, I'm wondering if we have a

Re: [web2py] Re: Do we have any Turbogears to web2py model migration script?

2011-03-28 Thread Tito Garrido
SQLObject :( So this tutorial wouldn't work, right? Regards, Tito On Mon, Mar 28, 2011 at 3:54 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Does it use SQLAlchemy or SQLObject? If SQLAlchemy this may work: http://www.web2py.com/AlterEgo/default/show/189 On Mar 28, 1:52 pm,

Re: [web2py] Re: Do we have any Turbogears to web2py model migration script?

2011-03-28 Thread Massimo Di Pierro
No. On Mar 28, 2011, at 2:22 PM, Tito Garrido wrote: SQLObject :( So this tutorial wouldn't work, right? Regards, Tito On Mon, Mar 28, 2011 at 3:54 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Does it use SQLAlchemy or SQLObject? If SQLAlchemy this may work:

[web2py] Missing patches in pyfpdf

2011-03-28 Thread BJ
fpdf.py should be updated with new version solving the issue of broken add_font function (http://code.google.com/p/pyfpdf/issues/detail? id=5can=1). There is also update on template.py, but I didn't tested yet.

[web2py] Re: A way to disable totally auto migration ?

2011-03-28 Thread Anthony
On Monday, March 28, 2011 1:12:09 PM UTC-4, Massimo Di Pierro wrote: I am looking at the source code right now. Currently this does not override the behavior of individual define_table(s). It just provides the default behavior in case a migrate argument is not passed. Since this is

Re: [web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread AdamF
Just one thing to make it clear - maybe i shouldn't write mails so fast :) In the ideal word when you start designin your application from scratch - drow all thge diagrams or do it in any other way, traditional or agile - it doesn't matter - but when you start from scratch you can do everything

[web2py] Ready web2hash

2011-03-28 Thread contatogilson...@gmail.com
Yesterday enjoying the day off, I developed the web2hash beta. This applicationaggregates all relevant information to web2py on Twitter (of course those who use thehash # web2py in your tweets). Below is the link to access the application and there ownlink to the project repository:

[web2py] components and sessions

2011-03-28 Thread carlo
I have a behaviour I can not explain. In a controller this is a regular syntax: session.mysession={} session.mysession['myfield']=myvalue but in a .load component the same fails. On the other side: session.simplevalue=myvalue works with no problem even in components. Does anyone has an

[web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread villas
http://www.netjeff.com/humor/item.cgi?file=shootfoot Come on - Python gets a clean slate here! Anyhow, if Adam was the only shooter and his guns fully locked, his foot should not be at risk. Just 2 cents. :-)

Re: [web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread David Warnock
Hi, Come on - Python gets a clean slate here! Anyhow, if Adam was the only shooter and his guns fully locked, his foot should not be at risk. Just 2 cents. :-) I know, that is why I like the joke. Dave -- Dave Warnock: http://42.blogs.warnock.me.uk Cycling Blog:

[web2py] Re: components and sessions

2011-03-28 Thread Massimo Di Pierro
what do you mean by fails can you provide a test case? On Mar 28, 5:15 pm, carlo syseng...@gmail.com wrote: I have a behaviour I can not explain. In a controller this is a regular syntax: session.mysession={} session.mysession['myfield']=myvalue but in a .load component the same fails.

[web2py] Re: Ready web2hash

2011-03-28 Thread Massimo Di Pierro
+1 On Mar 28, 3:55 pm, contatogilson...@gmail.com contatogilson...@gmail.com wrote: Yesterday enjoying the day off, I developed the web2hash beta. This applicationaggregates all relevant information to web2py on Twitter (of course those who use thehash # web2py in your tweets). Below is the

[web2py] Re: web2py 1.94.6

2011-03-28 Thread kenji4569
Are you sure this exact code worked before? Yes. I checked it again. In fact, the issue just occurred when I upgraded from 1.94.5 to 1.94.6. On 3月28日, 午後11:34, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you sure this exact code worked before? On Mar 28, 4:51 am, kenji4569

[web2py] Re: web2py 1.94.6

2011-03-28 Thread Massimo Di Pierro
Thanks now I know where to look. :-) On Mar 28, 6:43 pm, kenji4569 hos...@s-cubism.jp wrote: Are you sure this exact code worked before? Yes. I checked it again. In fact, the issue just occurred when I upgraded from 1.94.5 to 1.94.6. On 3月28日, 午後11:34, Massimo Di Pierro

[web2py] Re: question from stackoverflow - DB transactions

2011-03-28 Thread villas
Lol, we should make a similar comparison of web-frameworks. But joking aside... I often use Firebird and it supports Global Temporary Tables. I wonder whether that is something designed to resolve Adam's requirement. You can keep the temporary data even when the connection is lost.

[web2py] Re: Help needed on 3rd party authentication and links

2011-03-28 Thread howesc
yup tenthrow was down - cherokee keeps crashing about once a month for no good reason. Pystar - you are right, no janrain there - it wasn'tin web2py where i built that. the code is here: http://web2pyslices.com/main/slices/take_slice/77 i see you commented there but never gave details of

[web2py] import csv not respecting unique?

2011-03-28 Thread Brian Will
I have this table: db.define_table('region', Field('name'), Field('longname'), Field('subdomain', unique=True), Field('status_', 'reference region_status') ) The unique constraint is preventing me in the appadmin from adding regions with the same subdomain, as intended. However,

[web2py] Re: import csv not respecting unique?

2011-03-28 Thread Brian Will
I should add that I'm seeing this with SQLite. Haven't tried it with Postgres yet. On Mar 28, 5:25 pm, Brian Will brian.thomas.w...@gmail.com wrote: I have this table: db.define_table('region',     Field('name'),     Field('longname'),     Field('subdomain', unique=True),    

Re: [web2py] Re: File Upload and save to DB

2011-03-28 Thread Ismael Alejandro
?? On Thu, Mar 24, 2011 at 7:18 PM, Ismael Alejandro ialejandr...@gmail.comwrote: Hi again, working with the original section, now I have this: - On a CLIENT computer, I generate the INI file with this structure: [Room] name = room1 color = red size = big - I send it by FTP to the

[web2py] Re: import csv not respecting unique?

2011-03-28 Thread Brian Will
I should also make clear that I'm talking about db.export_to_csv_file() and db.import_from_csv_file() On Mar 28, 5:27 pm, Brian Will brian.thomas.w...@gmail.com wrote: I should add that I'm seeing this with SQLite. Haven't tried it with Postgres yet. On Mar 28, 5:25 pm, Brian Will

[web2py] Re: import csv not respecting unique?

2011-03-28 Thread Brian Will
Just tried it with Postgres and now import_from_csv_file() is throwing an exception with message duplicate key value violates unique constraint region_subdomain_key, so I guess this is a sqlite specific thing. On Mar 28, 5:33 pm, Brian Will brian.thomas.w...@gmail.com wrote: I should also make

[web2py] How could I insert data from script??

2011-03-28 Thread Ialejandro
Hi!! How could I save data to DB from a script?? I have a script that runs with web2py -R script.py How could I handle the DB from that script?? I just have this: From gluon Import DAL and then???

[web2py] Re: How could I insert data from script??

2011-03-28 Thread Massimo Di Pierro
web2py -S appname -M -N -R script.py and script.py should just contain: db.export_to_csv_file(open('filename','wb')) On Mar 28, 8:05 pm, Ialejandro ialejandr...@gmail.com wrote: Hi!! How could I save data to DB from a script?? I have a script that runs with web2py -R script.py How could I

[web2py] Re: File Upload and save to DB

2011-03-28 Thread villas
I already made a suggestion, did you look at this?... http://code.google.com/p/csvstudio/ This code is able to parse csv files and create web2py models, it might be helpful. Thanks, D On Mar 29, 1:28 am, Ismael Alejandro ialejandr...@gmail.com wrote: ?? On Thu, Mar 24, 2011 at 7:18 PM,

[web2py] Re: How could I insert data from script??

2011-03-28 Thread villas
I think Ialejandro wants to import: All tables... db.import_from_csv_file(open('somefile.csv', 'rb')) One table... db.person.import_from_csv_file(open('test.csv', 'r')) See the book, DAL chapter for more information about that. On Mar 29, 2:09 am, Massimo Di Pierro massimo.dipie...@gmail.com

[web2py] Re: Ready web2hash

2011-03-28 Thread Anthony
This is cool. A few notes: - The background doesn't show up in IE (the background is just plain white in IE). - If the box containing the tweets doesn't completely fit in the visible window (e.g., if the browser is zoomed in or the window is small), your Developed by Gilson

[web2py] Re: Ready web2hash

2011-03-28 Thread contatogilson...@gmail.com
I used the Twitter API to search by Topics Trend, so some entries are not inserted intothe hash does not appear. Later a search can be implemented more detailed web2pyon Twitter. Compared to IE, and I realized that I must fix this weekend. _ *Gilson

[web2py] Very Bad Error Experience...

2011-03-28 Thread Yannick
Hello Mate, On my LIVE production server (Hosting Server), from the admin console I tried to upgrade the web2py server by clicking on the button Upgrade Now and I got the confirmation interface and clicked YES and then I got this error page. Internal error Ticket issued:

Re: [web2py] Re: Do we have any Turbogears to web2py model migration script?

2011-03-28 Thread Vasile Ermicioi
but you can generate models from database