Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support backward relationships. Fixes #23 upstream bug #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dispiste
Copy link

No description provided.

@@ -334,7 +334,7 @@ def serialize_queryset(self, queryset):

for field in reversed_fields:
if field.serialize:
field_name = field.rel.related_name or opts.object_name.lower()
field_name = field.rel.related_name or (field.model._meta.object_name.lower()+'_set')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could split this line and name intermediary variable explicity :)

@leplatrem
Copy link
Collaborator

Thanks for take care of this! The issue has been here for a while :)

Would you mind adding a little test to assert that the behaviour you just fixed will remain fixed forever :) Thanks !

@dispiste
Copy link
Author

Hi Mathieu, I will try to write the test in the following days. Thanks!

On 15 January 2015 at 09:54, Mathieu Leplatre notifications@github.com
wrote:

Thanks for take care of this! The issue has been here for a while :)

Would you mind adding a little test to assert that the behaviour you just
fixed will remain fixed forever :) Thanks !


Reply to this email directly or view it on GitHub
#44 (comment)
.


César Martínez Izquierdo
GIS developer


Blog: http://geotechnotes.wordpress.com/
ETC-SIA: http://sia.eionet.europa.eu/
Universitat Autònoma de Barcelona (SPAIN)


@leplatrem
Copy link
Collaborator

Hi @dispiste ! Do you need help to write a small fix test ?

@dispiste
Copy link
Author

Hi @leplatrem , I have not found the time to write the test yet. I'd be happy if you can write it, or I'll do it when I find a free slot. Thanks!

@aboutaaron
Copy link

This is certainly a much needed fix. I can aid in the test to make this merge if necessary.

@leplatrem
Copy link
Collaborator

Thanks @aboutaaron for your proposition!

Yes please! Without test we can't merge this :)

@leplatrem
Copy link
Collaborator

@aboutaaron @dispiste this cannot be merged without tests unfortunately...

@dispiste
Copy link
Author

dispiste commented Feb 9, 2016

Great if you can add the test, I don't currently have the time to do so.
Thanks!

On 8 February 2016 at 22:46, Mathieu Leplatre notifications@github.com
wrote:

@aboutaaron https://github.com/aboutaaron @dispiste
https://github.com/dispiste this cannot be merged without tests
unfortunately...


Reply to this email directly or view it on GitHub
#44 (comment)
.


César Martínez Izquierdo
GIS developer


SCOLAB: http://www.scolab.es


@askpatrickw
Copy link

askpatrickw commented Jul 20, 2018

I found a workaround... If you want to use the GeoDjango serializer alongside django-geodjango, then go into settings and where you added this (probably years ago)

# settings.py

SERIALIZATION_MODULES = {
    'geojson' : 'djgeojson.serializers'
}

change geojson to djgeojson or something of your liking. If you were using the geojson serializer you'll need to change those references as well. For me, I was not, I was only using the view GeoJSONLayerView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants