[web2py] Re: mailing with pgp

2012-04-27 Thread szimszon
It seems that the gnupg home is still not set correctly. Could you post from python shell (where code is working) import os print os.environ And above modify the tools.py (after that you have to restart web2py I guess) and post the printed os.environ output. Without sensitive data :) 2012. ápr

[web2py] SQLFORM

2012-04-27 Thread Vibhor Purandare
I want to change position of Lables ;created in SQLFORM ??? Please Help

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-27 Thread rif
I had the same issue and I solved by adding plugin python in the uwsgi web2py configuration: python <--HERE 127.0.0.1:9001 /home/www-data/web2py/ wsgihandler joi, 12 aprilie 2012, 09:23:39 UT

Re: [web2py] Re: Creating a table or a an entry in a DB from index()

2012-04-27 Thread Khalil KHAMLICHI
IMHO, models should be read only once (start), and then upon admin wish by using some sort of reload, I believe this kind of realtime configuration of web2py comes at a huge cost of performance and no percieved benefets, here is a real world example, I have applications running for years now, the

Re: [web2py] Re: Ubuntu and Python3

2012-04-27 Thread Khalil KHAMLICHI
I prefer the name of web2py to web3py, besides web2py is already offering us web3 functionalities. On Apr 26, 2012 4:22 PM, "Sebastian E. Ovide" wrote: > just wondering if having web3py in python 3 will give us some problem with > some share hosting > > On Thu, Apr 26, 2012 at 2:52 PM, Johann

[web2py] Re: mailing with pgp

2012-04-27 Thread szimszon
Now I tested the tools.py and I can set the GUNPGHOME with mail.settings.gpg_home = '/dir/to/where/is/.gnupg' and works. I set it wrong place than I can't sign the mail. 2012. április 27., péntek 5:15:12 UTC+2 időpontban weheh a következőt írta: > > I took the additional step of checking all the

[web2py] Re: ATTENTION before upgrading to trunk....

2012-04-27 Thread Simon Lukell
Anyone storing Facebook IDs will hit that limit, so as a PostgreSQL shop developing lots of FB apps, we can't wait for this to be released. On Friday, 27 April 2012 04:40:06 UTC+10, villas wrote: > > Thinking more about this, an INTEGER will generally store over 2 billion > records. Is the r

[web2py] Re: ATTENTION before upgrading to trunk....

2012-04-27 Thread Simon Lukell
Anyone storing Facebook IDs will hit that limit, so as a PostgreSQL shop developing lots of FB apps, we can't wait for this to be released. Should have some test results on Monday On Friday, 27 April 2012 04:40:06 UTC+10, villas wrote: > > Thinking more about this, an INTEGER will generally st

[web2py] Re: ATTENTION before upgrading to trunk....

2012-04-27 Thread stefaan
> > > An inner voice is saying: "Can't the person who has breached that limit > be asked to create his own tables instead of giving all the rest of us the > inconvenience?". > An inner voice is saying: "640K [rows] ought to be enough for anybody" ? ;)

[web2py] Re: How do I show my views code in a web2py page

2012-04-27 Thread Anthony
And of course, you can always pass the code in from the controller: def index(): return dict(code="{{some code}}") Anthony On Friday, April 27, 2012 1:35:57 AM UTC-4, Anthony wrote: > > Several options: > > *Pure HTML:* > > {{some code}} > > > *Python string formatting:* > > {{='{%s}' % '{so

[web2py] Postgres error

2012-04-27 Thread Loreia
Hi, I define two tables in my application as: db.define_table( "block_names" , Field("block_name" ,default=None) ) db.define_table( "block_data" , Field("block_names_id" ,default=None)

[web2py] Re: SQLFORM.factory Field2 depends on Field1

2012-04-27 Thread Massimo Di Pierro
IS_IN_SET(getFamilies(form.vars.Segment should be IS_IN_SET(getFamilies(request.vars.Segment but I would not set this validator in models, I would set it in controller function, where needed. On Thursday, 26 April 2012 12:54:26 UTC-5, cory n wrote: > > Okay, I want to make the second f

[web2py] Re: crud.create causes an id problem

2012-04-27 Thread Massimo Di Pierro
Please open a ticket about this. On Thursday, 26 April 2012 13:21:34 UTC-5, villas wrote: > > Just a thought... if you are trying to create a new table which has a > 'bigint' id, this may be incompatible if it references an existing table > which has an 'integer' id. > > Regards, > David >

[web2py] Re: How can I combine Facebook login and regular login?

2012-04-27 Thread Massimo Di Pierro
Look into this: /gluon/contrib/login_methods/extended_login_form.py On Thursday, 26 April 2012 23:30:34 UTC-5, Kenny wrote: > > So I think I successfully implemented Facebook login. However, I have a > problem combining with regular login. > > Because as the book stated, I did > > auth.settings

[web2py] Re: SQLFORM

2012-04-27 Thread Anthony
Look into the "formstyle" argument (you could try using "divs" or "ul", plus some CSS): http://web2py.com/books/default/chapter/29/7#SQLFORM. If that doesn't get you what you want, check out http://web2py.com/books/default/chapter/29/7#Custom-forms (form.custom.label, etc.). Anthony On Friday

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-27 Thread Bruce Wade
I have used this process to set up 3 servers now with uwsgi + nginx = http://library.linode.com/web-servers/nginx/python-uwsgi/ubuntu-10.10-maverick On Fri, Apr 27, 2012 at 1:16 AM, rif wrote: > I had the same issue and I solved by adding plugin python in the uwsgi > web2py configuration: > > >

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-04-27 Thread Bruce Wade
Guess you haven't worked on really popular sites ;) On Fri, Apr 27, 2012 at 4:20 AM, stefaan wrote: > >> An inner voice is saying: "Can't the person who has breached that limit >> be asked to create his own tables instead of giving all the rest of us the >> inconvenience?". >> > > An inner voic

Re: [web2py] Postgres error

2012-04-27 Thread Bruce Wade
(db.block_names.id == db.block_data.block_names_id) db.block_names.id is an integer db.block_data.block_names_id is a character varying. update db.define_tables("block_data", Field("block_names_id", "integer", default=None) On Fri, Apr 27, 2012 at 5:00 AM, Loreia wrote: > Hi, > > I def

[web2py] Re: Cookies and Sessions

2012-04-27 Thread Yago
I think i screw up answering because i don't see it, what i wanted to do basically was to avoid registration, so i could put the name and some data in the cookies and use it to identify him and even retrieve some data(how many times they connected to me) and things like that. I know they could

[web2py] Re: Cookies and Sessions

2012-04-27 Thread Anthony
> > I'm quite new to web2py and a noob at it. I've been struggling with the > difference between cookies and sessions. For what I've read the main > difference is that you store cookies on the clients side and sessions on > the server side Yes, cookies are sent back and forth between the serv

Re: [web2py] Cookies and Sessions

2012-04-27 Thread Anthony
> > > *2. When are they deleted?* > > When you do session.forget() > session.forget() does not delete the session file -- it just tells web2py not to save any changes to the session during the current request. Anthony

Re: [web2py] Cookies and Sessions

2012-04-27 Thread Yago
That makes it all really clear, thank you so much Anthony. The browser deletes the session cookie when you close it, but there's still the server session. What happens to that? I mean when you open the browser again do you get assigned another session or do you 'reconnect' to the old one mainta

[web2py] Re: SQLFORM.factory Field2 depends on Field1

2012-04-27 Thread cory n
This works, after I submit once, then my selection for FIELD1 appears in FIELD2. I need it to operate before a submit though, so that once a "Segment" is selected, I can use that selection in the other dropdown boxes before a submit. Thanks Cory On Friday, April 27, 2012 8:13:58 AM UTC-5, Ma

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-04-27 Thread villas
On Friday, 27 April 2012 15:10:15 UTC+1, Bruce Wade wrote: > > Guess you haven't worked on really popular sites ;) > > LOL hmm, guess you're right. When I go flying through that 2 billion recs barrier, I'll be blessing those BIGINTs. :-)

[web2py] Re: SQLFORM.factory Field2 depends on Field1

2012-04-27 Thread villas
You can do that on the client side using javascript. The jQuery library is useful. Read the jQuery section of the book: http://www.web2py.com/books/default/chapter/29/11 And google for example on: jquery cascading selects On Friday, 27 April 2012 16:00:44 UTC+1, cory n wrote: > > This works

[web2py] Re: mailing with pgp

2012-04-27 Thread weheh
os.environ listing: > LANG >> TERM >> SHELL >> LESSCLOSE >> XDG_SESSION_COOKIE >> SHLVL >> SSH_TTY >> OLDPWD >> GPGKEY >> PWD >> LESSOPEN >> SSH_CLIENT >> LOGNAME >> USER >> PATH >> MAIL >> LS_COLORS >> HOME >> _ >> SSH_CONNECTION >> >>

[web2py] Re: web2py how to change underscore to hypens in URL

2012-04-27 Thread villas
I guess you'll need to restart the server or re-load the routes in the Admin area. On Thursday, 26 April 2012 20:36:33 UTC+1, nav010 wrote: > > Hey All, > > tried this by changing map_hyphen=true in routes.py, but the change is not > reflected. > > Anybody please let me know how can I see this

[web2py] Re: crud.create causes an id problem

2012-04-27 Thread Ross Peoples
I have created Issue 777: http://code.google.com/p/web2py/issues/detail?id=777 On Friday, April 27, 2012 9:15:07 AM UTC-4, Massimo Di Pierro wrote: > > Please open a ticket about this. > > On Thursday, 26 April 2012 13:21:34 UTC-5, villas wrote: >> >> Just a thought... if you are trying to creat

Re: [web2py] Re: Ubuntu and Python3

2012-04-27 Thread Ross Peoples
I would imagine that you would still have the same problem unless shared hosts figure out a way to make uWSGI easier to use. I have given up on shared hosting. The price of a low-end VPS is just as low (and sometimes lower) as most shared hosting plans with MUCH better performance. I have playe

[web2py] is selective field keepvalues possible?

2012-04-27 Thread Richard Vézina
Hello, I would like to keep last inserted values in form but not for every fields... I try to set db.table.field.default=None, but it is not working... How may I do that? Thanks Richard

[web2py] book typo : Single paragraph should be split I think

2012-04-27 Thread Richard Vézina
Hello, I think there is multiple paragraph in this paragraph : keepvalues keepvalues The optional argument keepvalues tells web2py what to do when a form is accepted and there is no redirection, so the same form is displayed again. By default the form is cleared. If keepvalues is set to True, th

Re: [web2py] is selective field keepvalues possible?

2012-04-27 Thread Massimo Di Pierro
db.table.fieldname.default=request.vars.fieldname On Friday, 27 April 2012 12:38:04 UTC-5, Richard wrote: > > Hello, > > I would like to keep last inserted values in form but not for every > fields... I try to set db.table.field.default=None, but it is not > working... > > How may I do that? >

[web2py] How to manage redundant files for application version control

2012-04-27 Thread mrtn
Hi, I'm using Git (Github) to manage my app development in Web2py. I noticed that each time when I make a commit lots of runtime generated files such as error tickets, logs, db files, etc are picked up by Git, which probably shouldn't be checked in as part of the codebase. These files exist at

Re: [web2py] How to manage redundant files for application version control

2012-04-27 Thread Jonathan Lundell
On Apr 27, 2012, at 11:08 AM, mrtn wrote: > I'm using Git (Github) to manage my app development in Web2py. I noticed that > each time when I make a commit lots of runtime generated files such as error > tickets, logs, db files, etc are picked up by Git, which probably shouldn't > be checked in a

Re: [web2py] is selective field keepvalues possible?

2012-04-27 Thread Richard Vézina
I mean, I set keepvalues=True, then set default like this : db.table.fieldname.default=None What you suggest "db.table.fieldname.default=request.vars.fieldname" is to not using the keepvalues (keepvalues=False)... Works fine! Thanks On Fri, Apr 27, 2012 at 1:57 PM, Massimo Di Pierro < massimo.d

[web2py] PyCon Argentina 2012: Scientific Meetings - Call for Sponsors and Researchers

2012-04-27 Thread Mariano Reingart
PyCon Argentina 2012 is applying for Scientific Meetings official government support, with extended deadline 05-15-2012: http://www.agencia.gob.ar/spip.php?page=convocatorias_articulo&mostrar=1583 If you are sponsor or researcher, please contact us, we need to line-up speakers and estimate sponso

[web2py] Re: SQLFORM.factory Field2 depends on Field1

2012-04-27 Thread Anthony
See http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910 . On Friday, April 27, 2012 11:00:44 AM UTC-4, cory n wrote: > > This works, after I submit once, then my selection for FIELD1 appears in > FIELD2. I n

Re: [web2py] Cookies and Sessions

2012-04-27 Thread Derek
Session cookies would be deleted after browser close, so you'd be assigned a new session. The files are not deleted because the server has no way of knowing if the person has restarted their browser or not. On Friday, April 27, 2012 7:40:55 AM UTC-7, Yago wrote: > > That makes it all really clea

Re: [web2py] Re: Creating a table or a an entry in a DB from index()

2012-04-27 Thread Anthony
That's a good point. Note, you can use conditional models, so models that are only needed by a particular controller or function are only defined on requests to that controller/function. You can also define models in a class or function in a module and only import and define the models specifica

[web2py] date type field issue with db.tablename.fieldname.default = request.vars.fieldname

2012-04-27 Thread Richard Vézina
Hello, I get : 'str' object has no attribute 'year' Try to solve it like this without success : db[request.args(0)].test_date.default = datetime.date(*tuple(request.vars.test_date.split('-'))) Then it ask for integer... Richard

Re: [web2py] How to manage redundant files for application version control

2012-04-27 Thread Richard Vézina
It a mercurial example, but you have the list of folder to ignore : http://www.web2pyslices.com/slice/show/1348/version-control-development-vs-production Richard On Fri, Apr 27, 2012 at 2:21 PM, Jonathan Lundell wrote: > On Apr 27, 2012, at 11:08 AM, mrtn wrote: > > I'm using Git (Github) to ma

Re: [web2py] date type field issue with db.tablename.fieldname.default = request.vars.fieldname

2012-04-27 Thread Richard Vézina
Solved : datetime.datetime.strptime(request.vars.test_date, '%Y-%m-%d').date() On Fri, Apr 27, 2012 at 3:09 PM, Richard Vézina wrote: > Hello, > > I get : 'str' object has no attribute 'year' > > Try to solve it like this without success : > > db[request.args(0)].test_date.default = > datetime.

[web2py] Re: Postgres error

2012-04-27 Thread Cliff
Field('block_names_id', db.block_names, requires=IS_EMPTY_OR( IS_IN_DB(db, 'block_names.id', '%(block_name)s')) ) On Friday, April 27, 2012 8:00:34 AM UTC-4, Loreia wrote: > > Hi, > > I define two tables in my application as: > > db.define_table( "block_names" >, Field("b

[web2py] Re: Add conditional sub-menu

2012-04-27 Thread Cliff
Sorry I didn't see this sooner. I think all your menu items will want that empty list, and I see some do not. Also I am confused about how a menu script could cause a dal to raise an exception. Maybe somebody with a better knowledge of the internals will chime in here. On Wednesday, April 25

[web2py] Re: Cookies and Sessions

2012-04-27 Thread Anthony
> > Technically, the server-side session does not get erased when you close > the browser (though you can explicitly clean up old session files using a > script like this one: > http://code.google.com/p/web2py/source/browse/scripts/sessions2trash.py). > However, the session cookie on the brows

[web2py] Re: mailing with pgp

2012-04-27 Thread szimszon
What distrib is this? What is the content of GPGKEY? The list is from python shell or from web2py? 2012. április 27., péntek 17:34:06 UTC+2 időpontban weheh a következőt írta: > > os.environ listing: > > >> LANG >>> TERM >>> SHELL >>> LESSCLOSE >>> XDG_SESSION_COOKIE >>> SHLVL >>> SSH_TTY >>> O

[web2py] How to make an AJAX crawlable app

2012-04-27 Thread Alexander Cabezas
Hi, How can I make a AJAX crawlable app with web2py? https://developers.google.com/webmasters/ajax-crawling/?hl=es-ES

Re: [web2py] Cookies and Sessions

2012-04-27 Thread Derek
Oh, one more thing - if you want to delete the sessions, errors, and caches, click the 'clean' button in admin. On Friday, April 27, 2012 7:40:55 AM UTC-7, Yago wrote: > > That makes it all really clear, thank you so much Anthony. The browser > deletes the session cookie when you close it, but t

[web2py] Re: How to make an AJAX crawlable app

2012-04-27 Thread Derek
Read the instructions provided by google? On Friday, April 27, 2012 2:11:32 PM UTC-7, Alexander Cabezas wrote: > > Hi, > > How can I make a AJAX crawlable app with web2py? > https://developers.google.com/webmasters/ajax-crawling/?hl=es-ES

Re: [web2py] Re: How to make an AJAX crawlable app

2012-04-27 Thread Khalil KHAMLICHI
Its all explained in there,

Re: [web2py] Cookies and Sessions

2012-04-27 Thread Anthony
> > Oh, one more thing - if you want to delete the sessions, errors, and > caches, click the 'clean' button in admin. > That's useful if you want to pack the application, but you may not want to do that on production, as you might delete active sessions, errors that you haven't viewed yet, etc