Django 1.6 removed the has_auto_field on admin forms

It's named needs_explicit_pk_field now. In order to support all versions of Django, output the pk field if either property is true.

See https://code.djangoproject.com/ticket/13696