Re: Geo support with Django Rest Framework

2013-10-21 Thread Sanjay Bhangar
Hi Rok, Thank you so much for the reply and code snippets. I think I managed to implement the stuff I needed using the hooks provided by Django-Rest-Framework -- not 100% sure why I picked that over Tastypie for this, but its treating me well, so I'll stick to it .. Since we're sharing code :), t

Re: Geo support with Django Rest Framework

2013-10-21 Thread Sanjay Bhangar
Hey Tom, On Mon, Oct 21, 2013 at 1:50 PM, Tom Christie wrote: > Hi Sanjay, > > I would take a look at these two repos: > > https://github.com/dmeehan/django-rest-framework-gis > https://github.com/mjumbewu/django-rest-framework-gis > This is EXACTLY what I was looking for. Obviously, I need to w

Re: Geo support with Django Rest Framework

2013-10-21 Thread rok
I'm using tastypie for the REST functionality which I have extended so that geolocation can be used as a filter, e.g.: class TestResource(ModelResource): class Meta: queryset = Event.objects.all() resource_name='test' ordering = ['date_from'] def get_

Re: Geo support with Django Rest Framework

2013-10-21 Thread Tom Christie
Hi Sanjay, I would take a look at these two repos: https://github.com/dmeehan/django-rest-framework-gis https://github.com/mjumbewu/django-rest-framework-gis You might also try searching the REST framework issue list as it's likely either or both of these were at some point discussed there. Als

Geo support with Django Rest Framework

2013-10-20 Thread Sanjay Bhangar
Hi all, I'm developing an app using GeoDjango that requires me to create an API. Ideally, I would output GeoJSON at various API end-points and support a few geo-queries like "within bounding box", etc. I have done something similar before without Django Rest Framework and just writing vanilla vie