Static files can't be opened by your python code.
Just remove them form your app.yaml file.
They will be uploaded and you can use them as templates.

2009/4/3 Viktar <karp...@gmail.com>:
>
> I am trying to create package for controls. Here is my folder
> structure:
>
> /controls
>   items.py
>   __init__.py
>
> /controls/templates
>   items.html
>
> items.py has a Render method:
>
> def Render():
>     ....
>    items_control_path = os.path.join(os.path.dirname(__file__),
> 'templates/items.html')
>    return template.render(items_control_path,{'items':items})
>
> I am calling this method from root index.py, so it returns me html of
> control:
>
> from controls.items import Items
> ...
> control = {'items':Items.Render()}  # I did some work around, so it is
> ok to call Render method like this
>
> Locally everything works great. However if I deploy application it
> gives me an error. It can't find items.html.
>
> Here is my app.yaml:
>
> - url: /controls/items
>  script: controls/items.py
>
> - url: /controls/templates/(.*\.html)
>  static_files: controls/templates/\1
>  upload: controls/templates/(.*\.html)
>
> If in browser I go directly to /controls/templates/items.html template
> is showing up, so file is there.
>
> I think packages are deployed some how different then static files, so
> path is not correct.
>
> I don't want dump controls and pages in the same root folder. Is there
> any solution for a problem?
>
> How I can reference static template files from modules in packages?
>
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to