added custom represent to GoogleDatastoreAdapter, thanks Alan
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.9.9-stable+timestamp.2014.09.13.18.54.57
|
||||
Version 2.9.9-stable+timestamp.2014.09.14.11.58.10
|
||||
|
||||
@@ -5053,6 +5053,17 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
|
||||
def parse_id(self, value, field_type):
|
||||
return value
|
||||
|
||||
def represent(self, obj, fieldtype):
|
||||
if fieldtype == "json":
|
||||
if have_serializers:
|
||||
return serializers.json(obj)
|
||||
elif simplejson:
|
||||
return simplejson.dumps(obj)
|
||||
else:
|
||||
raise Exception("Could not dump json object (missing json library)")
|
||||
else:
|
||||
return NoSQLAdapter.represent(self, obj, fieldtype)
|
||||
|
||||
def create_table(self, table, migrate=True, fake_migrate=False, polymodel=None):
|
||||
myfields = {}
|
||||
for field in table:
|
||||
|
||||
Reference in New Issue
Block a user