This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext import db | |
from django.utils import simplejson | |
### Functions ### | |
def fetch_references(entities, attr): | |
"""Fetches and sets ReferenceProperty attributes in one db call""" | |
keys = [] | |
for entity in entities: | |
key = getattr(entity, '_' + attr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pickle with patch by Aaron Gallagher (habnabit) applied: | |
# http://bugs.python.org/issue3119 | |
"""Create portable serialized representations of Python objects. | |
See module cPickle for a (much) faster implementation. | |
See module copy_reg for a mechanism for registering custom picklers. | |
See module pickletools source for extensive comments. | |
Classes: |
NewerOlder