[web2py] Re: GAE Caching and Views

2011-11-28 Thread johntynan
Thanks everyone for your excellent help! I posted an account of enabling caching with web2py on GAE in a blog post here: http://opensourcebroadcasting.blogspot.com/2011/11/web2py-caching-and-google-app-engine.html All the best, JT

[web2py] GAE Caching and Views

2011-11-22 Thread johntynan
I am using the following decorator: @cache(request.env.path_info, time_expire=5, cache_model=cache.ram) To cache some db queries, however, when I go to deploy this on Google App Engine, I receive a PicklingError: Can't pickle type 'function': attribute lookup __builtin__.function failed You can

[web2py] Updating the property of an upload field on GAE

2011-05-08 Thread johntynan
Within my web2py app, I am using the pygooglechart module to create .png files for QRCodes to display the url to audio files like these: http://publicradioroadtrip.appspot.com/publicradioroadtrip/default/view_collection/383010 This all works great on my local computer, however, when I try to

[web2py] Re: extending web2py's generic.rss view

2011-04-15 Thread johntynan
Rather than use use gluon.serializers.rss, I am using gluon.contrib.rss2 to attempt to add an enclosure to an rss feed: http://code.google.com/p/publicradioroadtrip/source/browse/controllers/default.py?spec=svnd020b7842a1c0a9ba880fb5f94146bbb5ab55524r=d020b7842a1c0a9ba880fb5f94146bbb5ab55524#590

[web2py] Re: extending web2py's generic.rss view

2011-04-15 Thread johntynan
Got it! :) stories = {} collection_id=request.args(0) collection = db.collection[collection_id] or redirect(error_page) stories=db(db.story.collection.contains(collection_id)).select(orderby=db.story.title) length=len(stories); scheme = request.env.get('WSGI_URL_SCHEME',

[web2py] Re: extending web2py's generic.rss view

2011-04-11 Thread johntynan
No errors. The feed displays, but the enclosure and the comments tags to do not appear. If I call the function without the .rss at the end here is what I get: http://pastie.textmate.org/1782979 Note that the enclosure and discussions fields are present. If I call the same function using the

[web2py] extending web2py's generic.rss view

2011-04-10 Thread johntynan
I am trying to include an enclosure using web2py's generic.rss view here is the function I am using in my controller: http://pastie.textmate.org/1781075 however, when I go to http://localhost:8000/myapp/default/view_collection_feed.rss/1 the enclosure (or the simple comment that I am using as

[web2py] Re: Web2py GAE integration

2011-04-04 Thread johntynan
as mentioning the benefit of app versioning. On Mar 27, 4:50 pm, Jonathan Lundell jlund...@pobox.com wrote: On Mar 27, 2011, at 3:21 AM, johntynan wrote: I had written a tutorial about Setting up web2py for use with Google App Engine here: http://opensourcebroadcasting.blogspot.com

[web2py] Re: Web2py GAE integration

2011-03-27 Thread johntynan
Ahmed, I had written a tutorial about Setting up web2py for use with Google App Engine here: http://opensourcebroadcasting.blogspot.com/2010/04/setting-up-web2py-for-use-with-google.html Please feel free to have a look and let me know if this helps you. Also, please feel free to let me know if

[web2py] Re: web2py fabric, pip, virtualenv, virtualenvwrappers deployment scripts

2011-03-25 Thread johntynan
I just rebuilt my current work with web2py on a new laptop (running ubuntu 10.10). Since google app engine's dev server requires python 2.5, I used the following command to install python2.5 within my virtualenv: virtualenv --python=python2.5 --no-site-packages python25_virtualenv However, I am

[web2py] Re: undefined record error in appadmin on GAE

2011-02-14 Thread johntynan
Wikus, I enabled the remote api in app.yaml as you suggested. Then, after changing the path slightly in the following command: python appcfg.py create_bulkloader_config --filename=config.yaml -e $em...@gmail.com --url=https://$APP.appspot.com/_ah/remote_api your suggestion for creating a

[web2py] Re: Suggestion for the Web2py book regarding importing and exporting data

2011-02-14 Thread johntynan
Hi Kenneth. Would it be possible to share the code you use to export and import as a csv file only the data that belongs to a particular user. Thanks kindly, JT On Jan 17, 12:47 pm, Kenneth Lundström kenneth.t.lundst...@gmail.com wrote: Appadmin already has the ability to expoert and import

[web2py] Suggestion for the Web2py book regarding importing and exporting data

2011-01-17 Thread johntynan
In reading the chapter on CSV and Remote Database Syncronization in the web2py book, specifically in these sections: 2. Create a controller action to export the database: 3. Create a controller action to import a saved copy of the other database and sync records Would it be advisable to mention

[web2py] Schema migration to GAE / Creating a Test Suite

2011-01-17 Thread johntynan
I have a web2py app that has been running very well on Google App Engine (which also contains actual client's data). However, when I first deployed this app, I did not realize that in order to backup and synchronize the data, I needed to include a modified_on and uuid field on all my models. I

[web2py] Re: Interview with Massimo published

2011-01-14 Thread johntynan
Wonderful! What an excellent profile of Massimo. I also like that there was credit for inspiration for parts of web2py from other frameworks and tools. It's interesting to think of web2py as a proof of concept... I might say it's safe to call web2py a proven, but evolving concept. I am

[web2py] Re: non-string (type list) error in appadmin on GAE

2011-01-14 Thread johntynan
Thanks Jonathan! I just tested this, and yes, you are right. This has been fixed in trunk. On Jan 14, 7:01 am, Jonathan Lundell jlund...@pobox.com wrote: On Jan 13, 2011, at 9:45 PM, johntynan wrote: I recently updated my web2py app to version 1.91.6 (along with updating GAE to version

[web2py] Re: undefined record error in appadmin on GAE

2011-01-13 Thread johntynan
Massimo, I just upgraded to 1.91.6 and yes, the checks that had been put in place did resolve this issue for me. Wikus, thank you for the detailed advice. I have more work to do with this, so your suggestion may come in handy. Thanks everyone!

[web2py] non-string (type list) error in appadmin on GAE

2011-01-13 Thread johntynan
I recently updated my web2py app to version 1.91.6 (along with updating GAE to version 1.4.1) and am now able to export csv files from the appadmin as I had intended. However, now, if I try to view _any_ of the rows within the tables by way of the appadmin, I receive a TypeError: __str__ returned

[web2py] undefined record error in appadmin on GAE

2011-01-09 Thread johntynan
I am running a web2py application on GAE. I would like to export different tables as CSV files from my application by way of the appadmin. (My goal is to create both a backup of the data and a test suite with actual data). However, I am receiving the following undefined record error when

[web2py] Using list:reference in a model on GAE

2010-10-27 Thread johntynan
I have a question about using list:reference in a model on Google App Engine. Here is my model: http://code.google.com/p/publicradioroadtrip/source/browse/models/db_custom.py?spec=svna7a27f086f9519cd6c133493eed55ffd64f9446cr=a7a27f086f9519cd6c133493eed55ffd64f9446c#33 I am able to add records

[web2py] Re: app engine file paths

2010-10-14 Thread johntynan
Chris, I am troubleshooting this same issue. Try adding this to your model: import sys import os.path site_packages_path = os.path.join(request.env.web2py_path,'site- packages') if sys.path[0] != site_packages_path: sys.path.insert(0, site_packages_path) # print site_packages_path I also

[web2py] Re: please help us test new web site

2010-10-10 Thread johntynan
Great work with the new web2py site! I like how well the top and right hand navigation is used and I was glad to discover some resources about web2py that I didn't realize were available. I have one question. Do you think the twitter link should direct people to the twitter search for web2py,

[web2py] Re: Many to Many TypeError: int() argument must be a string or a number, not 'list'

2010-09-29 Thread johntynan
? Best regards, John T. On Sep 29, 6:42 am, mdipierro mdipie...@cs.depaul.edu wrote: just use auth.user_id is the same created_by should be type=db.auth_user On Sep 28, 10:31 pm, johntynan jgty...@gmail.com wrote: if auth.is_logged_in():     me=auth.user.id else:     me=None

[web2py] Many to Many TypeError: int() argument must be a string or a number, not 'list'

2010-09-28 Thread johntynan
I would like to create a many-to-many relationship in the following model, where many stories can appear in many different roadtrips (think songs to mixtapes). db.define_table( 'roadtrip', Field('name'), Field('description', 'text'),

[web2py] Re: Many to Many TypeError: int() argument must be a string or a number, not 'list'

2010-09-28 Thread johntynan
if auth.is_logged_in(): me=auth.user.id else: me=None On Sep 29, 5:19 am, mdipierro mdipie...@cs.depaul.edu wrote: what is me? Do you use auth? why the type of created_by is a string? On Sep 28, 10:01 pm, johntynan jgty...@gmail.com wrote: I would like to create a many-to-many

[web2py] Re: Why Django Sucks (slides)

2010-09-09 Thread johntynan
Nice mention of web2py about the application object. I've run into a snag with web2py by not knowing I should have have UUID primary keys... Is this something that could be handled at the web2py level and not within the app/model itself? Would this be similar to what the author means by late

[web2py] Re: Exporting data from GAE BigTable

2010-08-02 Thread johntynan
Bruno, Have you tried using web2py's appadmin for your particular app: https://yourgaeappname.appspot.com/yourweb2pyappname/appadmin I am working towards backing up my app running on GAE, in the process, one of the developers I am working with pointed out the following: The created_by fields

[web2py] Re: python web console

2010-06-06 Thread johntynan
You can also try the following from the command line: # in linux python web2py.py -S yourappname -M # in windows web2py.exe -S yourappname -M On Jun 6, 4:15 pm, Tomas Pelka tompe...@gmail.com wrote: Hi all, if I'm correct web2py had a web (java script) python console. I can't find it now,

[web2py] undefined record error on GAE

2010-04-25 Thread johntynan
I am receiving the following undefined record error in web2py running on GAE (and not in development): http://pastie.textmate.org/934992 I tried removing the orderby grouping here: http://bit.ly/dxeRPo But the error persists. Does anyone have any suggestions for troubleshooting this issue?

[web2py] Re: undefined record error on GAE

2010-04-25 Thread johntynan
In case it helps, I am using web2py Version 1.77.3 and GAE release: 1.3.3 On Apr 26, 12:45 am, johntynan jgty...@gmail.com wrote: I am receiving the following undefined record error in web2py running on GAE (and not in development): http://pastie.textmate.org/934992 I tried removing

[web2py] Setting up web2py for use with Google App Engine

2010-04-12 Thread johntynan
I just wrote a blog post about setting up web2py for use with Google App Engine: http://opensourcebroadcasting.blogspot.com/2010/04/setting-up-web2py-for-use-with-google.html I hope you find this useful. Any comments or feedback are welcome. -- To unsubscribe, reply using remove me as the

[web2py] Paid/Preferred Users and Google App Engine

2010-03-22 Thread johntynan
Thankfully, I have received a decent amount of interest in the web2py app that I've launched on Google App Engine here: http://opensourcebroadcasting.appspot.com/pledgedrives Now, my question is what is the best way to distinguish between Paid/ Preferred users from people who are casually

[web2py] Re: web2py beautification

2010-03-14 Thread johntynan
While I admire and would welcome having the option of using 960 grid templates, Massimo's suggestion of incorporating jquery's themeroller into the welcome app sounds equally interesting. I'm not much of a designer, but I value the ideal of a tableless design. I'd be willing to try to free up

[web2py] Re: web2py rocks!

2010-02-03 Thread johntynan
:) On Feb 2, 8:08 pm, johntynan jgty...@gmail.com wrote: Thanks!  Here is some additional information: http://opensourcebroadcasting.blogspot.com/2010/02/introducing-pledge... Also, between us here on the web2py group, here is the link to create an account and set up your own pledge

[web2py] web2py rocks!

2010-02-02 Thread johntynan
We just had a successful launch of my first web2py app on Google App Engine! KUNC, a public radio station in Greeley, Colorado, was the first client to use the app, and they offered a lot of suggestions and refinements on the work. Using, GAE, it only cost us $8.50 to pound away at the app for

[web2py] Re: web2py rocks!

2010-02-02 Thread johntynan
...@cs.depaul.edu wrote: Congratulations! any link we can look at? On Feb 2, 11:29 am, johntynan jgty...@gmail.com wrote: We just had a successful launch of my first web2py app on Google App Engine! KUNC, a public radio station in Greeley, Colorado, was the first client to use the app

[web2py] Limiting the Contents of a Select Tag

2010-01-22 Thread johntynan
I have a class called create_challenge here: http://code.google.com/p/pledgedrivetracker/source/browse/pledgedrives/controllers/default.py?spec=svn74b5784e200a53af235d6ea9abc83359e0ce3196r=74b5784e200a53af235d6ea9abc83359e0ce3196#415 This model for the challenge has a foreign key to the person

[web2py] Re: GAE AttributeError

2010-01-07 Thread johntynan
/b3508f4a9b16d279/408bf5afdad3d92b?lnk=gstq=johntynan#408bf5afdad3d92b I am able to add the form variables to a session. However, I would like to now save the form.vars in a session variable as a list of dictionaries as well. Just for grins I tried session.form_vars=list(dict(form.vars)) do you have

[web2py:38338] GAE AttributeError

2010-01-05 Thread johntynan
I have a web2py app that runs well under web2py, as well as within the GAE development server, however, after updating the app, and then testing this on the production server here: http://opensourcebroadcasting.appspot.com/pledgedrives/ When submitting one specific session_organization_id_form

[web2py:37092] Re: Saving Session Variables via a Form

2009-12-12 Thread johntynan
Thank you for your suggestions. At this point, I am not trying to create a record in the database at the same time that I am setting a session variable. What I would like to do is set session.organization_id (and possibly session.organization_name) by way of a selection list. I am able to get

[web2py:36909] Re: testing web2py's jsonrpc service using the python interactive shell

2009-12-09 Thread johntynan
/default/call/jsonrpc,verbose=1) 2/ The call function is defined ? def call():     session.forget()     return service() On 8 déc, 19:58, johntynan jgty...@gmail.com wrote: I am looking in the admin and do not see any tickets for the error. So, web2py is not getting the request. On Dec

[web2py:36635] Re: Finding the Sum for a Specific Field in a Query

2009-12-06 Thread johntynan
, johntynan jgty...@gmail.com wrote: I have a question about finding the sum of a specific field across the results of an entire query While this statement will return the total number (len) of records returned in a query: pledgedrive_total_pledges = len(db (db.pledge.pledgedrive

[web2py:36101] Saving Session Variables via a Form

2009-11-27 Thread johntynan
I have a question about saving the values from a crud form as session variables (as opposed to updating a record in the database). Do you know where there might be a good example for doing this? To get started, I riffed off of the thread here: