[web2py] Set which browser web2py opens in

2014-05-24 Thread Greg Vaughan
Is there any way to set the "default" browser for web2py to open in. It's normal behaviour is to use the computer default... can this be changed? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

[web2py] Re: how to turn python array into javascript array inside of a SCRIPT(...)

2014-05-24 Thread weheh
Yup, it works. I guess I was getting hung up on something else and confused it with this issue. Sorry for the bother & thanks, as usual, for the help. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.

[web2py] Re: how to turn python array into javascript array inside of a SCRIPT(...)

2014-05-24 Thread weheh
I'm pretty sure I already tried that. But I'll have a go at it again. Thanks Massimo! On Saturday, May 24, 2014 9:58:45 PM UTC+8, Massimo Di Pierro wrote: > > def mymodule(): > from gluon.serializers import json > T = current.T > x = [T('fee'),T('fie'),T('foe'),T('fum')] # I want to

[web2py] Problem (and solution) with wsgihandler.py on Passenger Phusion + Apache

2014-05-24 Thread Larry Weinberg
I have experienced and fixed a problem with wsgihandler.py when using the latest Passenger Phusion and Apache. Dreamhost automatically upgraded the Phusion on my server and this immediately broke a couple of my web2py sites. It boiled down to the following line in the web2py-provided wsgihandle

[web2py] Re: web2py on EC2

2014-05-24 Thread Gaurav Kalyan
Hi Massimo, There has some changes in deploying the web2py on EC2 because of update in Apache 2.4 and using ubuntu 14.04:- 1. file at etc/apache/sites-available is default it should be default.conf ( we can do workaround it by mv default to default.conf) 2. Use of *Require all granted*

Re: [web2py] URL() and HTTPS

2014-05-24 Thread Richard Vézina
Thanks Anthony, I can use scheme and host, etc. no problem. I suggest notting since the problem I thought was existing is not. :) Richard On Fri, May 23, 2014 at 5:51 PM, Anthony wrote: > Yes, but to be clear, "over and over" really means "once per user session, > if and only if the user st

[web2py] Re: How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Ian W. Scott
Thanks Massimo. I explained my problem a bit better (I hope) in my reply to Philip below. There are a couple of reasons why the approach you suggest isn't ideal, from my point of view: 1. I'm working with existing database instances (sqlite). So if I change all of the reference fields to

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-24 Thread Diogo Munaro
But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, "Massimo Di Pierro" escreveu: > There is nothing equivalent to this in web2py. You just remove that line. > > On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: >> >> >> Hey Massimo, and how could

Re: [web2py] How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Ian W. Scott
Thanks, Phil. I think you've understood my problem fairly well. If I'm unclear it's partly because I'm new to db mechanics, but I'll try to lay things out more clearly: My existing setup: - I have two existing instances of the same web2py application - Currently the models just use web2py

[web2py] Re: how to turn python array into javascript array inside of a SCRIPT(...)

2014-05-24 Thread Massimo Di Pierro
def mymodule(): from gluon.serializers import json T = current.T x = [T('fee'),T('fie'),T('foe'),T('fum')] # I want to use the translated values in the script below return CAT( DIV(... some stuff ...), SCRIPT("""$(function() { x = %(x)s; ... do

[web2py] Re: Web2py Hosting

2014-05-24 Thread www.diazluis.com
http://virpus.com/ El jueves, 22 de mayo de 2014 06:56:13 UTC-4:30, sasogeek escribió: > > I've been looking around for python hosting websites that I can get my > web2py deployed on but none of them is easy to work with. I'd rather prefer > the ease to work on my application than having the h

[web2py] Re: Simple loan system for library

2014-05-24 Thread john smith
I'm very new to this, so I'm not sure if I understand the 'foreign key' concept, but from what I understand Field('copies', db.copies), would be my foreign key reference. Now that i thought about it, it should probably go the other way since I want one book to have many copies. But I would still

[web2py] How to deploy web2py on EC2?

2014-05-24 Thread Gaurav Kalyan
I have followed all the steps written in the blog http://www.scribd.com/doc/26436821/Howto-deploy-Web2py-on-amazon-Ec2 but still I am not able to run web2py on ec2. I am using EC2 micro instance with UBUNTU 14.04. I am using one script deployment provided in the above blog. web2py has been i

Re: [web2py] How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Philip Kilner
Hi Ian, I see that Massimo has answered you, but on re-reading your question I wasn't clear quite what you were asking. I have an application that needs to use UUIDs myself, so thought it worth jumping in. On 14/05/14 16:44, Ian W. Scott wrote: > I need to take an existing db and implement a UUID

[web2py] how to turn python array into javascript array inside of a SCRIPT(...)

2014-05-24 Thread weheh
I've seen this one asked regarding how to pass python array into javascript array inside of a view, but here I want to do it inside a SCRIPT and it's eluding me. I have a module.py that's generating a button with pulldown. I want to be able to do something like this: def mymodule(): T = cur

[web2py] Re: How to make session variables persist even after logout ?

2014-05-24 Thread Massimo Di Pierro
http://web2py.com/books/default/chapter/29/09/access-control?search=auth.settings.extra_fields On Friday, 23 May 2014 23:06:12 UTC-5, Mandar Vaze wrote: > > Derek, > > May be I misrepresented my scenario - These aren't exactly preferences. > In both the applications - user sees SQLFORM.grid with l

[web2py] Re: How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Massimo Di Pierro
Hello Ian, Sorry we overlooked your email. You can easily add a UUID field from gluon.util import web2py_uuid db.define_table('person',Field('name'),Field('uuid',compute=lambda:web2py_uuid())) You can also create table that reference that field: db.define_table('thing',Field('name'),Field('owne

[web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-24 Thread Massimo Di Pierro
There is nothing equivalent to this in web2py. You just remove that line. On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: > > > Hey Massimo, and how could I replace > > > command: "django-admin.py syncdb --noinput" > > ? > > I need migrate=False because I have a loadbalancer with el