fix edit plugin page 500 errors on django 1.5