Search code examples
pythondjangogoogle-app-enginedjango-nonrel

Linking google-appengine native model to Django model


I've ported my GAE project to django-nonrel, and now I would like to have link from my object to Django User object:

class Opinion(google.appengine.ext.db.Model):
  ...
  author = db.ReferenceProperty(django.contrib.auth.User)

Unfortunately, that's not possible, since you only can link GAE models this way.

Question - what's the best way to solve this? Is it possible or should I work it around somehow?

I don't want to migrate my old GAE model since I already have a bunch of data there.


Solution

  • My initial googling and searching brought me nothing good:

    On django-nonrel list I read:

    You cannot use appengine model into django-nonrel. You need alter all your models to django proper. That is, use original django-registration app not the appengine-patch provided registration.

    Another question, exactly like mine, was left unanswered.

    ... and I've found another place where people recommend switching to Django models.

    I guess that's that then, there is no way of doing what I need, one needs to migrate.