Hi Tom-

>
> 1.  Does the app.yaml support uploading files into different directory
> structures than exist on disk?  (eg. Locally files are in ../xyz and
> they need to be installed in /abc.)
>

This is not currently supported, the directory structure when uploaded
directly mimics the directory structure of the uploaded directory.

It should be noted that static files and program files are treated
separately from one another.  Which is to say, once uploaded, your python
program does not have access to read the directory structure of the static
files.


>
> 2.  What would the app.yaml look like for the case where /abc maps to
> abc.py, abc/foo.html maps to a static file?
>

In this case you would need to specify the abc/foo.html handler prior to
abc/.*.  We evaluate the regular expressions in order, and the handler for
the first regex that matches the request is always served.


>
> 3.  Perhaps related, what is the best way to map a
> RequestHandler.get() call to an uploaded static html file?  (eg. A
> post() call to /abc gets processed but then the get() call displays
> the static file abc/foo.html)
>

For this, you would not treat foo.html as a static file.  Instead it would
be a program file.  So lets say that you had a templates directory for your
program files in app/templates.  Your code for this handler might look like:

class MainPage(webapp.RequestHandler):
  def get(self):
    path = os.path.join(os.path.join(os.path.dirname(__file__), 'templates'),
'foo.html')
    self.response.out.write(template.render(path, template_values))


  def post(self):
  .... do stuff here

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to