refactor to django version dependent subclass retrieval