Re: [web2py] Re: Method to interactively experiment with web2py

2012-02-26 Thread Phyo Arkar
web2py shell no longer works with latest ipython 0.11 + On 2/20/12, Massimo Di Pierro wrote: > What you use > > python web2py.py -S app -M -N > > make sure to db.commit() your changes. > > On Feb 19, 5:45 pm, davidkw wrote: >> I'm wondering if there's some kind of way to use a shell or other IDE

[web2py] oauth 2.0 and facebook "expires" parameter

2012-02-26 Thread Can Candan
It appears facebook does not return the 'expires' parameter for web page sign on, however the code in oauth20_account.py does not take into account this case. Should it handle that or am I missing something?

[web2py] Introducing myself

2012-02-26 Thread Luciano Pacheco
Hi all, I joined the group yesterday. I've started a small project and in my point of view web2py fits perfectly in this case. The client want: Port a player management to Linux. A player that handles music and database update through FTP downloads, handles the playlist based in programs/sche

Re: [web2py] Re: Method to interactively experiment with web2py

2012-02-26 Thread Luciano Pacheco
Hi Phyo, I'm using web2py and ipython 0.12 normally. $ ./web2py.py -S instore web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.99.4 (2011-12-14 14:46:14) stable Database drivers available: SQLite3, pymysql Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) T

[web2py] Running a player in background - Thread

2012-02-26 Thread Luciano Pacheco
Hi all, I have to control/manage/automatize a player (music) and I managed to do in the following way. I posting here to get feedback and also I liked the solution, so it can be useful for others. ;-) Firstly, I chose the mplayer as the player because of multi-platform and multi-filetypes suppor

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-26 Thread Anthony
On Sunday, February 26, 2012 12:19:17 AM UTC-5, Peter G. wrote: > > How would one obtain the URL to a image blob stored on GAE's > datastore? A lot of the threads I've looked at were all for generating > an download output for views, but I need this for the Controller since > I'm returning this

[web2py] Re: Introducing myself

2012-02-26 Thread whowhywhat
Hi Luciano, You said that right, web2py has a great community :) .. welcome aboard. I'm sure you will find web2py a superb web development framework. I have been using web2py casually for the last one year or so, and on a serious basis for the last 2 months. If you are happy about the inbuilt cron

[web2py] How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-26 Thread Paul
In the dal I'm selecting two summed fields and adding them together, the column name in the set object ends up being called '(SUM(t_appointment.miles_to) + SUM(t_appointment.miles_from))', how would I define the dal query to get an better column name (e.g. total_miles) ? Current query is: def mi

[web2py] cron setup

2012-02-26 Thread Sanjeet Kumar
Can anyone give me the brief description to how I set the cron to run the task in background with example.

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-26 Thread Anthony
I'm not sure you can do that. In order to access the mysum column in the result, you would do: row[mysum] Anthony On Sunday, February 26, 2012 11:05:59 AM UTC-5, Paul wrote: > > In the dal I'm selecting two summed fields and adding them together, > the column name in the set object ends up bei

[web2py] Web2py and SSLH

2012-02-26 Thread Doug Elkin
I'm thinking about setting up SSLH on my personal server. >From http://freecode.com/projects/sslh: > sslh accepts HTTPS, SSH, OpenVPN, tinc, and XMPP connections on the > same port. This makes it possible to connect to any of these servers > on port 443 (e.g., from inside a corporate firewal

[web2py] Re: Why does this not work for mysql?

2012-02-26 Thread simon
Thanks that is helpful. The postgres script looks like it will work for mysql. Would be nice if this could be incorporated into web2py so you can use auto_import to look at non-web2py databases from existing systems. On Feb 25, 9:59 pm, Anthony wrote: > > db1 = DAL('sqlite://storage.sqlite', fol

[web2py] Access to app variables in modules

2012-02-26 Thread Ed Greenberg
I create lots of modules which need to interact with my app. I've been passing things into them and wonder if I'm doing the simplest and best practice: aObj=local_import("a",reload=True) a=aObj(db,auth,settings,session,module_specific_params) Then, in the class, I use them as self.settings.fo

Re: [web2py] Access to app variables in modules

2012-02-26 Thread Vinicius Assef
See what documentation says about "current". It makes session, request, response, etc. available to your module. -- Vinicius Assef On Sun, Feb 26, 2012 at 4:11 PM, Ed Greenberg wrote: > I create lots of modules which need to interact with my app.   I've > been passing things into them and won

Re: [web2py] Access to app variables in modules

2012-02-26 Thread Bruno Rocha
On Sun, Feb 26, 2012 at 4:11 PM, Ed Greenberg wrote: > aObj=local_import("a",reload=True) > local_import is now deprecated. Use newest web2py version and you can use the new importer with the syntax. *from a import aOb*j or just* import a * inside the module you can do from gluon import curren

[web2py] Re: Why does this not work for mysql?

2012-02-26 Thread simon
Actually I just discovered previous post which suggests exactly this addition and which has some code attached and Massimo says he will review. However I could not find it in web2py. Is it there somewhere? Previous post is here: http://groups.google.com/group/web2py/browse_thread/thread/c347e86a66

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-26 Thread Alan Etkin
I know you want to modify the query, but you could replace the string when the rows are passed to a helper instance. On 26 feb, 13:05, Paul wrote: > In the dal I'm selecting two summed fields and adding them together, > the column name in the set object ends up being called > '(SUM(t_appointment.

[web2py] Re: cron setup

2012-02-26 Thread Alan Etkin
It's all in the book (if you haven't seen yet) http://web2py.com/books/default/chapter/29/4#Cron By the way, The link in web2py to cron (http://web2py.com/books/ default/reference/29/cron) is broken (returns an invalid function message) On 26 feb, 13:09, Sanjeet Kumar wrote: > Can anyone give m

[web2py] Re: Sporadic ImportError with custom module

2012-02-26 Thread Alan Etkin
I guess that there is code in the app that could be rendering the module readable or not between requests. Why would web2py or the operating system find the module randomly? On 24 feb, 10:46, spiffytech wrote: > My web2py app is hosted on Apache with mod_wsgi. Sometimes I'm > browsing through it

Re: [web2py] Re: cron setup

2012-02-26 Thread Luciano Pacheco
I think Sanjeet means, I example of the task. What is a good practice in the task, or what kind of variables are present in the local namespace "automagically", etc. A task should be a class a function, a python module? I had the same question last week when I was reading this chapter. :-) Regar

Re: [web2py] Re: Sporadic ImportError with custom module

2012-02-26 Thread Luciano Pacheco
On Mon, Feb 27, 2012 at 10:22 AM, Alan Etkin wrote: > I guess that there is code in the app that could be rendering the > module readable or not between requests. Why would web2py or the > operating system find the module randomly? > Concurrency, race conditions and those things. "spiffytech",

[web2py] Re: Running a player in background - Thread

2012-02-26 Thread Alan Etkin
Cool!. Don't know if there are tools like that for other environments, but I think this could be used for controlling more sofisticated sound playing systems than the standard desktop application like those used for music events. On 26 feb, 08:01, Luciano Pacheco wrote: > Hi all, > > I have to co

[web2py] In plugin_wiki meta-code tables i cannot upload data :(

2012-02-26 Thread smogzer
I'm trying to create a meta-database that can be defined via meta-code and i've come to a bug : i can't upload data to fields in that database. Could anybody fix the problem ? here is a sample code for testing. http://127.0.0.1/apagar/plugin_wiki/page_edit/meta-code code: db.define_table('imagex',

[web2py] Re: cron setup

2012-02-26 Thread Anthony
> > By the way, The link in web2py to cron (http://web2py.com/books/ > default/reference/29/cron) > is broken (returns an invalid function > message) > Actually, there's a bug in the book app -- all the "reference" links are broken.

[web2py] Re: Access to app variables in modules

2012-02-26 Thread Anthony
See http://web2py.com/books/default/chapter/29/4#Accessing-the-API-from-Python-modules. Note, "from gluon import *" imports the entire web2py API, including the "current" thread local object containing the environment variables. Anthony On Sunday, February 26, 2012 2:11:40 PM UTC-5, Ed Greenb

Re: [web2py] Re: cron setup

2012-02-26 Thread Sanjeet Kumar
Exactly I need the examples On Mon, Feb 27, 2012 at 4:56 AM, Luciano Pacheco wrote: > I think Sanjeet means, I example of the task. > > What is a good practice in the task, or what kind of variables are present > in the local namespace "automagically", etc. A task should be a class a > function,

[web2py] Re: request.user_agent() dumping [closed]

2012-02-26 Thread weheh
Indeed. Fixed in latest stable web2py 1.99.4. On Feb 22, 10:15 pm, Massimo Di Pierro wrote: > I think this was fixed in a later version. > > On Feb 21, 9:52 pm, weheh wrote: > > > > > > > > > I'm trying to detect the browser being used to access my web2py app. > > The literature seems to recomme

[web2py] Re: request.user_agent() dumping

2012-02-26 Thread weheh
And, I might add, this is simply awesome. It would also be very cool if it could give me the dimensions of the browser window. I know I can get it via jQuery, but it would save a step. On Feb 22, 10:15 pm, Massimo Di Pierro wrote: > I think this was fixed in a later version. > > On Feb 21, 9:52 p

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-26 Thread Paul
Thanks Anthony, That syntax works and I can use that to refer to the data, I could see that a row object had an '_extra' dict for the selected expressions but could not see that the data could be referred to be the name of the expression 'mysum' (its in there somewhere but not sure where!!) On Fe