[f for f in MyModel._meta.get_fields()
if (f.one_to_many or f.one_to_one)
and f.auto_created and not f.concrete]
However, doing so will raise errors on L350, where field.serialize will fail for ForeinKey and OneToOne fields. Removing the if field.serialize conditions then raises 'OneToOneRel' object has no attribute 'rel'.
Where is this method field.serialize supposed to come from?
django-geojson==2.9.1 seems to work now, thanks to serializers.py L 432 ff. - custom get_allrelated* methods honouring Django version. Closing, thanks for the fix!
Using django-geojson with Django 1.10 throws "''Options' object has no attribute 'get_all_related_objects'".
Following Django 1.10's migration docs, serializes.pt L313 should probably read
However, doing so will raise errors on L350, where
field.serialize
will fail for ForeinKey and OneToOne fields. Removing theif field.serialize
conditions then raises'OneToOneRel' object has no attribute 'rel'
.Where is this method
field.serialize
supposed to come from?