[google-appengine] Re: Please, tell where to read about imports

2009-03-14 Thread Alexander Meinke
Hi Serega,

I'am not really sure about, but __init__.py defines a package. In your case you
have a package called controller. This package contains index(.py) and
portfolio(.py), which are modules. So, to make your app work, try this:

> here is main.py code:
> #
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
  # Instruction which import modules index and portfolio
> from controller import *
> 
> 
> # MAIN CONFIGURATION #
> # Register the URL with the responsible classes
  # This should do the trick
  application = webapp.WSGIApplication([ ('/', index.IndexPage), ('/
  portfolio', portfolio.PortfolioPage) ], debug=True)

It may also be possible to write the import statements for IndexPage and
PortfolioPage classes into the __init__.py file.

Hope this helps,

acm.



signature.asc
Description: OpenPGP digital signature


[google-appengine] Re: templates - offline yes, online no

2008-09-25 Thread Alexander Meinke
Wooble wrote:
> The static files are not copied to the same server as your
> python scripts so it doesn't matter how you try to reference them;
> they're *only* available at their static URLs over the web.

So it is impossible having templates in a static_[dir|files], because the
template engine works on system level, whereas static files are only accessible
via url.

>> ... and I do not really want to have templates under the projects root
>> folder.

"Is is inescapeable." - Agent Smith ;)

Thank you Wooble.



signature.asc
Description: OpenPGP digital signature