fixed support for older django versions