The clever folks behind the app-engine-patch project have essentially enabled all the fun stuff of Django, including the admin, but without using Django's ORM.
From their website:
The most important change is that you have to use Google's Model class because the development model is too different from Django (at least with Django's current API).
This is essentially what I want to do, but use Google's Protocol buffers as the data transport layer through RPC.
Using the Person message in their addressbook.proto example, I essentially want to do this:
from django.contrib import admin
from my开发者_运维问答rpc.models import Person
class PersonAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'email']
admin.site.register(Person, PersonAdmin)
app-engine-patch is no longer maintained and last time I tried it it was so buggy that I was better off reimplementing the middleware that I wanted. I also don't remember them to ever support Django's Admin.
Django's Admin is not compatible with Google App Engine's API for database access. It's actually totally different.
Then there's Django-norel which attempted to make Django's ORM compatible with GAE and you might have some luck with it, but again it is unmaintained.
So on GAE, don't use a patch because Django 1.2 is already included in the list of available APIs. See this section in their documentation: Third Party Libraries, Django
And you won't be able to use Django's Admin. Take your mind off it.
精彩评论