support django1.5
provide parametized conditions