google.appengine.ext.ndb.django_middleware module

Summary

Django middleware for NDB.

Contents

class google.appengine.ext.ndb.django_middleware.NdbDjangoMiddlewaresource

Bases: object

Django middleware for NDB.

To use NDB with django, add

‘ndb.NdbDjangoMiddleware’,

to the MIDDLEWARE_CLASSES entry in your Django settings.py file. Or, if you are using the ndb version from the SDK, use

‘google.appengine.ext.ndb.NdbDjangoMiddleware’,

It’s best to insert it in front of any other middleware classes, since some other middleware may make datastore calls and those won’t be handled properly if that middleware is invoked before this middleware.

See http://docs.djangoproject.com/en/dev/topics/http/middleware/.

process_exception(unused_request, unused_exception)source

Called by Django when a view raises an exception.

process_request(unused_request)source

Called by Django before deciding which view to execute.

process_response(request, response)source

Called by Django just before returning a response.

本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
App Engine standard environment for Python 2