bruth / django-preserialize

Convert your model instances and querysets into dicts and list with style.
http://bruth.github.io/django-preserialize
BSD 2-Clause "Simplified" License
41 stars 6 forks source link

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

Closed FrancescoSaverioZuppichini closed 7 years ago

FrancescoSaverioZuppichini commented 7 years ago

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?

bruth commented 7 years ago

What version of Django are you using?

FrancescoSaverioZuppichini commented 7 years ago

latest one

bruth commented 7 years ago

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

FrancescoSaverioZuppichini commented 7 years ago

My version:

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

bruth commented 7 years ago

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

FrancescoSaverioZuppichini commented 7 years ago

Nice bro.