@contextlib.contextmanager
def skip_cache():
    old = getattr(_locals, 'skip_cache', False)
    _locals.skip_cache = True
    try:
        yield
    finally:
        _locals.skip_cache = old


# This is sadly a copy and paste of annotate to get around this
# ticket http://code.djangoproject.com/ticket/14707
Testing GeometryField.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/amo/models.py/skip_cache--crossover with--dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/gis/tests/geoapp/tests_mysql.py/GeoModelTest.test06_geometryfield