Fixing django deprecation warning