Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is appengine_config.py

I am a noob trying to build an app on GAE. My app uses django templating features beyond those supported in version 0.96. I've not been able to get app engine (other than on the development server) to use the built in django 1.2 libraries.

I believe that this post might solve my problems except I don't know what appengine_config.py is. I assume I should include it in my project, but where and how? What should be in it other than the snippet in the post I referenced above?

Thanks!

like image 735
Hank Avatar asked Apr 05 '11 19:04

Hank


1 Answers

appengine_config.py at the top level of your project is automatically imported by google.appengine.ext.webapp.util.run_wsgi_app() to add middlewear to webapp applications. The snippet you linked to should be sufficient to load django 1.2.

Simply paste it into appengine_config.py, and in your main.py (or wherever):

application = webapp.WSGIApplication([your_mappings])
run_wsgi_app(application)

Note that if you're not loading middlewear like appstats in appengine_config.py, you can actually just put the use_library() call directly into main.py; the key is to make sure it's always loaded before django is loaded from elsewhere on a given instance.

like image 50
Wooble Avatar answered Sep 29 '22 05:09

Wooble