bruth / django-preserialize

Convert your model instances and querysets into dicts and list with style.

Home Page:http://bruth.github.io/django-preserialize

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'Options' object has no attribute 'get_all_related_objects'

FrancescoSaverioZuppichini opened this issue · comments

Hello,

I get this error:

AttributeError: 'Options' object has no attribute 'get_all_related_objects'

This is my code:

  user  = User.objects.get(pk=user_id)
   print(serialize(user))
class User(models.Model):
    displayName = models.CharField(max_length=28)
    email = models.CharField(max_length=28)
    isNearby = models.BooleanField(default=False)

Any Idea?

What version of Django are you using?

Ah, this package has been tested up to 1.10. They must have changed something in 1.11.

My version:

(1, 10, 5, 'final', 0)

I never made a release with the new version! Just released 1.2.1.