Reputation: 123108
I have an app using using Django Nonrel on AppEngine.
I'd like to use a dynamic model similar to WebApp's db.Expando class - is this possible? Is the Expando class exposed to the DNR layer?
Upvotes: 4
Views: 207
Reputation: 5879
You can use DictField & ListField from djangotoolbox to create dynamic models in Django-nonrel. For e.g.
from djangotoolbox.fields import DictField
class Image(models.Model):
exif = DictField()
and,
class Post(models.Model):
words = ListField(models.CharField(max_length=500))
title = models.CharField(max_length=200)
content = models.TextField(blank=True)
See Option 3 of Django dynamic model fields for more details.
Upvotes: 4
Reputation: 101139
Django implements its own DB abstraction layer - it's not built on App Engine's db module. If django does not provide it itself, it's not available.
Upvotes: -1