Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated tastyhacks to work with django-tastypie 0.9.9. Closes #1.

  • Loading branch information...
commit 76e1de88bbbd2bf2790f4e9003312436ee741f8f 1 parent 481231d
@onyxfish onyxfish authored
View
5 .gitignore
@@ -0,0 +1,5 @@
+*.pyc
+*.swp
+.DS_Store
+MANIFEST
+dist
View
BIN  boundaryservice/__init__.pyc
Binary file not shown
View
BIN  boundaryservice/admin.pyc
Binary file not shown
View
BIN  boundaryservice/authentication.pyc
Binary file not shown
View
1  boundaryservice/fields.py
@@ -5,7 +5,6 @@
from django.db import models
from django.utils import simplejson as json
-
class ListField(models.TextField):
"""
Store a list of values in a Model field.
View
BIN  boundaryservice/fields.pyc
Binary file not shown
View
BIN  boundaryservice/management/__init__.pyc
Binary file not shown
View
BIN  boundaryservice/management/commands/__init__.pyc
Binary file not shown
View
BIN  boundaryservice/management/commands/load_shapefiles.pyc
Binary file not shown
View
BIN  boundaryservice/models.pyc
Binary file not shown
View
BIN  boundaryservice/resources.pyc
Binary file not shown
View
5 boundaryservice/tastyhacks.py
@@ -3,7 +3,7 @@
from django.utils import simplejson
from tastypie.bundle import Bundle
-from tastypie.fields import ApiField, CharField
+from tastypie.fields import ApiField, CharField, ListField
from tastypie.resources import ModelResource
from tastypie.utils import trailing_slash
@@ -55,6 +55,9 @@ def convert(self, value):
if value is None:
return None
+ if isinstance(value, dict):
+ return value
+
# Get ready-made geojson serialization and then convert it _back_ to a Python object
# so that Tastypie can serialize it as part of the bundle
return simplejson.loads(value.geojson)
View
BIN  boundaryservice/tastyhacks.pyc
Binary file not shown
View
BIN  boundaryservice/throttle.pyc
Binary file not shown
View
BIN  boundaryservice/urls.pyc
Binary file not shown
View
BIN  boundaryservice/utils.pyc
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.