Avoided importing models from django.contrib.admin.

Fixed #21923. Refs #21719.