iali
iali

Reputation: 867

Using django-admin on django-nonrel, using App Engine models

I am creating an Django app for Google App Engine. I am using django-nonrel but am using Google App Engine models.

I am wanting to also use Django's admin site.

My models.py for airlines app is:

from google.appengine.ext import db

class Airline(db.Model):
 name = db.StringProperty(required=True)
 description = db.TextProperty()
 notes = db.TextProperty()

 class Meta:
  verbose_name_plural = 'Airlines'

 def __unicode__(self):
  return self.name

My admin.py is:

from django.contrib import admin
from airlines.models import *

admin.site.register(Airline)

I do GAE runserver and get the following error:

TypeError at /admin/

'PropertiedClass' object is not iterable

Can I not use Google App Engine models with django-nonrel admin?

Upvotes: 3

Views: 1121

Answers (1)

Thomas Wanschik
Thomas Wanschik

Reputation: 149

You can't use App Engine models with django-nonrel. You have to use django models. This way your code gets reusable and allows you to switch off of App Engine and to use your code with another database.

Upvotes: 6

Related Questions