Restore backward compatibility for older versions of Django