Fixed django 1.8 depreciation warning