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

2012-02-27 Thread BrendanC
Peter, I was trying to get this to work last week and this is what finally worked for me. Here's a link to my earlier thread on the same topic. https://groups.google.com/forum/?fromgroups#!topic/web2py/1h3Nd3_T9Js In my case I'm storing small blobs in the table/model - although that's not the b

[web2py] Re: I would like to learn Web2py but where do I start?

2012-02-24 Thread BrendanC
Another suggestion for learning is Python Koans - based on Ruby Koans - basically an interactive way to learn and test code by writing short lines of code. https://bitbucket.org/gregmalcolm/python_koans/wiki/Home Check them out! On Thursday, February 23, 2012 12:34:08 PM UTC-8, newbie wrote: >

[web2py] Re: GAE - Rendering uploaded Blob as jpeg image rather than as a string?

2012-02-23 Thread BrendanC
OK - Quick follow up here - I was able to display an blob image using the call: def list_image(): myid = 1# test image=db(db.xim.id==myid).select(orderby=db.xim.title) response.headers['Content-Type']='image/jpeg' mystream = image.image_blob return mystream However

[web2py] Re: I would like to learn Web2py but where do I start?

2012-02-23 Thread BrendanC
ulearn will be useful in the future - even if you decide to learn another web framework. (MVC. CSS, SQL etc are common across many web frameworks). Web2py however, is one of the more approachable ones with a gently learning curve. Hope this helps, BrendanC

[web2py] Re: GAE - Rendering uploaded Blob as jpeg image rather than as a string?

2012-02-23 Thread BrendanC
I thought the content type settings were handled automatically by the framework. Anyway - for some reason setting the response.headers to 'image/jpeg' does not work - just get an empty/blank page. I must be missing something else re handling gae blob properties - here's my test code: Any furt

[web2py] GAE - Rendering uploaded Blob as jpeg image rather than as a string?

2012-02-23 Thread BrendanC
would be helpful here. TIA, BrendanC

[web2py] GAE and Web2Py - Current Issues and some thoughts on Best Practices?

2012-02-21 Thread BrendanC
re ideas/issues/ and examples. Sorry if this is a bit of a ramble, but I'd be curious to hear from other App Engine developers here.. BrendanC

[web2py] Re: Web2Py/Google App Engine Apps - How to get ID or key after Inserting New Rec

2012-02-21 Thread BrendanC
howesc, My bad - you are correct. I retested bulk insert on GAE and it does work. I made a mistake with my syntax: Instead of: imgids = db.imagetag.bulk_insert(ddlist) I was using: imgids = db.imagetag.bulk_insert(**ddlist) Complete example: #Test example - Build a list of dicts

[web2py] Re: BELONGS is not supported on GAE?

2012-02-21 Thread BrendanC
e not got it to work yet - expect some surprises along the way to GAE enlightenment For some decent sample Web2py/GAE code take a look here: http://code.google.com/p/publicradioroadtrip/source/browse/ Hope this helps, BrendanC

[web2py] Re: Web2Py/Google App Engine Apps - How to get ID or key after Inserting New Rec

2012-02-20 Thread BrendanC
Just did some more testing -insert works OK, but bulk insert fails. FWIW I think this was previously reported as a problem. Here;s a link: https://groups.google.com/forum/#!searchin/web2py/bulk$20insert$20mapping/web2py/k9Pa2EdHNeA/1mcHn6bCWw4J

[web2py] Web2Py/Google App Engine Apps - How to get ID or key after Inserting New Rec

2012-02-20 Thread BrendanC
not covered in the docs (AFAIK). BrendanC

[web2py] Using Web2Py Shell with Google App Engine App- Does this work?

2012-02-20 Thread BrendanC
2py/mg5ICyEjTCg/9WN8k7pO22MJ TIA, BrendanC

[web2py] Virtual Field Issue - Possible Bug with old style/class definitions?

2012-02-12 Thread BrendanC
I've been experimenting with creating virtual fields and have come across what may be a possible bug when they are created via old style (class definitions). I created a small table with 3 fields (ID, Name and dob). I've added some virtual fields to compute the age in days using all the options

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread BrendanC
s it's easy to forget the important distinction here). Thx again for your help. BrendanC

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-09 Thread BrendanC
y valid for Rails, Django etc - afaik all these frameworks close and reopen connections for each request. Again thanks for your thoughtful response to my initial question. BrendanC

[web2py] DAL Limitations with aggregate and union queries

2012-02-02 Thread BrendanC
s difficult with the DAL: 1) In addition to the min/max values I also want the corrsponding record info in the result set 2) At best the DAL may require 2 separate db requests Any DAL guru's out there care to comment on this and provide an alternative

[web2py] Standalone DAL Usiage - Insert from a Dictionary (vs bulk_insert)

2012-01-26 Thread BrendanC
I'm testing standalone DAL usage - basically using the DAL to help move/convert some tables from an external db. Basically I'm trying to populate a dictionary with a subset of data from an external database and then insert a series of data records into a new table. I expected to be able to po

Re: [web2py] new to web2py/python

2011-11-26 Thread BrendanC
Build a small demo app (nothing too complicated)- study some of the sample apps and be sure to understand how the pieces fit together. Don't be afraid to borrow liberally from other apps when you start your own app - no point in reinventing the wheel. BrendanC

[web2py] Unwanted submit on checkbox click ?

2011-11-11 Thread BrendanC
x27; %item.name]] chbx = (INPUT( _type='checkbox', _name= 'chk%s' %item.name, _onclick="alert(this.checked)")) arr.append ([[item.name],[ chbx]]) return XML(TABLE(*[TR(*r) for r in arr], _id = 'tagtable')) BrendanC

[web2py] Re: excessive memory usage on webfaction

2011-11-10 Thread BrendanC
ng to get it to work. Hope this helps, BrendanC

[web2py] On Load behaviour and template extensions

2011-11-10 Thread BrendanC
d' behaviour when extending layouts. BrendanC

Re: [web2py] Offline Access to web2py manual?

2011-11-10 Thread BrendanC
Bruno, Exactly what I was looking for - many thanks! This is the sort of thing that should be documented rather than hidden. BTW - Where/how did you come up with that syntax? Thx much, BrendanC

[web2py] Offline Access to web2py manual?

2011-11-09 Thread BrendanC
able, but afaik it's pretty out of date. TIA, BrendanC

[web2py] Re: Client side (JS) Accessing to '_extra' field after Ajax/JSON request/response - How?

2011-11-08 Thread BrendanC
FWIW - I just create a new posting with some code that addresses the issues mentioned here. Here's the link: https://groups.google.com/forum/#!topic/web2py/CEHLCbMCPw0 Over and Out BrendanC

[web2py] Json, Ajax, Inner Join , Group By and '_extra' revisited - code example included

2011-11-08 Thread BrendanC
OK - I posted earlier on this thread https://groups.google.com/forum/#!topic/web2py/8yypDdtmG9g and vented some frustration re the handling of computed columns. Rather than clutter up the old threat I'm creating a new thread that contains the code that solves my problem. Feel free to offer alt

[web2py] Re: Client side (JS) Accessing to '_extra' field after Ajax/JSON request/response - How?

2011-11-08 Thread BrendanC
solution). >From a practical standpoint maybe some beefing up of the json section of the docs would be helpful. Right now I'm building a small demo app using dojo, ajax and web2py - I'll be happy to share any useful code samples when I'm a bit further on with my project. BrendanC

[web2py] Re: Client side (JS) Accessing to '_extra' field after Ajax/JSON request/response - How?

2011-11-08 Thread BrendanC
his is not a gripe/complaint - just sharing this with you as I know you are active on this forum and feedback on specific issues may be helpful to others in the future. BrendanC

Re: [web2py] Re: Virtual Fields and usual database's Views

2011-11-08 Thread BrendanC
lue. Also understand that you cannot update the view - which you probably don't want to do anyway. BrendanC

[web2py] Re: Client side (JS) Accessing to '_extra' field after Ajax/JSON request/response - How?

2011-11-08 Thread BrendanC
; + itags[x]._extra['COUNT(tagref.tag)' ]+ ''; } BrendanC

[web2py] Re: Virtual Fields and usual database's Views

2011-11-08 Thread BrendanC
ave to jump through a few hoops to use a view and there are some also potential maintenance issues. (FWIW views are very useful for simplifying complex queries and it's a pity that they are not well supported in most web environments). Hope this helps, BrendanC

[web2py] Client side (JS) Accessing to '_extra' field after Ajax/JSON request/response - How?

2011-11-08 Thread BrendanC
ag)": 2}} ]} OK - so far, so good. Now I need to extract the count info in my Ajax response - However the count info is not easily (AFAIK) accessible - the '_extra' structure is a web2py artifact that looks odd. I'm thinking there must be a better way to pass the count info to my view (e.g. {"count":4}. So how do I change this so I can reference the count info. Do I need to change my controller code, or is there some (undocumented) way to reference the '_extra' info in the json response. I can't see anything in the docs on this - so hopefully someone here can point me in the right direction here. TIA, BrendanC

[web2py] Re: Missing my posts - Anyone else losing posts

2011-11-03 Thread BrendanC
Ignore my previous qn - they just showed up again - so it's probably some sort of refresh issue with my broswer settings.

[web2py] Missing my posts - Anyone else losing posts

2011-11-03 Thread BrendanC
I've posted 2 messages over the past few days - one of which had several replies - now I can't find any of these messages. Any Ideas what's happening here? TIA BrendanC

[web2py] HTML Helpers - Position Dependency Gotcha

2011-11-03 Thread BrendanC
th normal html the parameter position does not matter. I'm not sure if Web2py has any 'troubleshooting' type documentation - but this type of example could be a useful addition to the manual/docs/other. Hope this helps someone. BrendanC

[web2py] Image searching - Redirecting Ajax Results to pass to template ??

2011-11-02 Thread BrendanC
OK - hope I can make this clear - it's more of a 'how to' design question and not really web2py specific. Imagine a view/template with a container/div that displays a (multipage) image gallery - this is the landing page (prepopulated with random images. The page has a Search sidebar to allow

[web2py] Complex CRUD Forms Examples with Web2py?

2011-10-23 Thread BrendanC
g/error display issues here - I know I need to build the custom templates by hand). Interested to hear any comments/feedback as the only form examples I can find are very basic (not real world). TIA, BrendanC

[web2py] Web2py and Rest

2011-10-21 Thread BrendanC
I know this has probably come up before, but I'd like to get my head around the options to use Restful URLs with Web2py. Are there any (recent) docs I can reference? I know there are some old threads, but would like to get an idea where things stand currently. (BTW - I'm not totally sold on r

[web2py] Web2py Lulu docs - Buy now or wait for the next release?

2011-10-04 Thread BrendanC
ering - so I don't expect to push the envelop too much here. Any thoughts, TIA, BrendanC

[web2py] Strategy for working with an existing database

2010-02-26 Thread BrendanC
I have an existing test db that I was using with Rails, so it conforms to the basic requirements re PK ID's etc. Can I use this in web2py without re coding the table defs etc. What is the best way to do this? I assume this comes up a lot, but I don't see this mentioned in the docs. TIA, Brendan

[web2py] Re: datagrid with cell styles - any examples?

2010-02-25 Thread BrendanC
ex(): return dict(people=db().select(db.person.ALL)) > > #view > {{extend 'layout.html'}} > > .red { backrgound-color: red; } > .green {background-color: green; } > > >   {{for p in people:}} >   >      {{=p.name}} >      {{=p.balance}} td> >

[web2py] datagrid with cell styles - any examples?

2010-02-25 Thread BrendanC
I'm interested in building a web2py demo that show color coded data in a (jquery?) datagrid. Ideally cells would be color coded based on the underlying data value (e.g. neg values, overdue dates etc. in red). This type of display is pretty common in desktop apps, spreadsheets etc. but I have not f

[web2py] Re: app admin - old app missing from list

2010-02-25 Thread BrendanC
your computer and simlink it to the > web2py/applications directory. Though keep in mind applications > created through admin will always existin in > web2py/applications/, but even then you do not need to use > admin to create/or edit any of the files. > > -Thadeus > > > >

[web2py] app admin - old app missing from list

2010-02-25 Thread BrendanC
newbie qns - I just d/loaded the latest version of web2py and on start up I see that a small app I created some time ago is not listed in the app list - the files are there in the web2py directory. Is there something I need to do to include missing apps (this is on Win XP - so it's not a symlink i

[web2py] Health Record demo app - source code available?

2010-02-18 Thread BrendanC
Just started looking at web2py and it looks quite impressive. I'm always interested in finding existing code to review/modify when learning a new technology. The video of the Electronic Health Record app looks great and is something I might be interested in extending (I have a lot of experience wit