3

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?

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.