From 9b70994cf7a3f5c929dff58e2b5ee35d6a4afbc3 Mon Sep 17 00:00:00 2001 From: Karthik Ravindra Date: Wed, 29 Apr 2015 17:40:04 -0400 Subject: [PATCH] Django 1.8 no longer has the SqlDateCompiler --- johnny/cache.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/johnny/cache.py b/johnny/cache.py index fbff25f..48c1ac8 100755 --- a/johnny/cache.py +++ b/johnny/cache.py @@ -409,8 +409,14 @@ def patch(self): self._read_compilers = ( compiler.SQLCompiler, compiler.SQLAggregateCompiler, - compiler.SQLDateCompiler, ) + + if hasattr(compiler, "SQLDateCompiler"): + #Support for django 1.8 + self._read_compilers += ( + compiler.SQLDateCompiler, + ) + self._write_compilers = ( compiler.SQLInsertCompiler, compiler.SQLDeleteCompiler,