Change field type checks to work with subclasses.

Review Request #10298 — Created Nov. 1, 2018 and submitted

Information

Django Evolution
master
7a4641f...

Reviewers

There's a large number of legacy if type is ... checks throughout the
codebase, which limits functionality to those specific field types.
While rare, any subclasses of these field types (such as ForeignKey)
would result in broken or inconsistent behavior.

This change updates all these to use issubclass or isinstance
instead of direct type checks.

Unit tests pass on all supported versions of Django.

Description From Last Updated

E231 missing whitespace after ','

reviewbotreviewbot

W503 line break before binary operator

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (d0251e0)