I'm also interested, albeit with a slightly different use-case.
During development, I'd like to be able to have my view defined as a
triple-quoted string in my controller's .py file, so I don't have to
flip between two files as I'm coding/debugging.  Once I'm satisfied
with my work, I'd delete the view from the .py file and add it as
a .html file.

On Jun 22, 2:03 pm, mdipierro <[email protected]> wrote:
> I should be able to di it tomorrow if no major obstacles.
>
> Massimo
>
> On Jun 22, 12:01 pm, Ted G <[email protected]> wrote:
>
>
>
> > Hi Massimo,
>
> > I've been watching trunk. Have you had any luck with this?
>
> > Ted
>
> > On Jun 18, 8:31 pm, mdipierro <[email protected]> wrote:
>
> > > not easy to do now, but easy to add. I will add this to trunk
> > > tomorrow.
>
> > > Massimo
>
> > > On Jun 18, 4:30 pm, Ted G <[email protected]> wrote:
>
> > > > I have an application in which I need to have the view rendered by a
> > > > controller be specified using a parameter to that controller.
>
> > > > I believe I could do the following based on what I've dug up in this
> > > > forum:
>
> > > > def index():
>
> > > >   try:
> > > >     response.view='default/' + request.args[0]  # eg.
> > > > 'indexview2.html'
> > > >    except:
> > > >     response.view='default/index.html'
>
> > > >   return dict(message=T('Hello World'))
>
> > > > Ideally, as I come up with new view templates, I would like to upload
> > > > them to the appropriate directory, allowing me to request an alternate
> > > > view by simply passing the filename of the new view to this
> > > > controller.
>
> > > > The problem is that I am running my application on Google App Engine,
> > > > therefore to upload new views I would have to update my application,
> > > > which is not practical if I am frequently adding new views.
>
> > > > The ideal solution would be to store the new view in a text or blob
> > > > field within a table of the database and then be able to use that text/
> > > > blob/string as the input to response.view instead of a file.
>
> > > > Is this at all possible under web2py's current template processing
> > > > (processing a view from a blobl/text/string instead of file).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to