Closed nick-merrill closed 7 years ago
The following monkey patch should fix the issue in the short term:
# Monkey patch for Python Social Auth as per
# https://docs.djangoproject.com/en/1.9/ref/models/meta/#migrating-from-the-old-api
def get_all_field_names():
from itertools import chain
return list(set(chain.from_iterable(
(field.name, field.attname) if hasattr(field, 'attname') else (field.name,)
for field in User._meta.get_fields()
# For complete backwards compatibility, you may want to exclude
# GenericForeignKey from the results.
if not (field.many_to_one and field.related_model is None)
)))
User._meta.get_all_field_names = get_all_field_names
instead of using all_names = _User._meta.get_all_field_names() use all_names = [f.name for f in _User._meta.get_fields()]
Ha, I see the updates on admin.py. Please update pip for other Django 1.10.x users
A fix for this was already merged into social-app-django.
Simply go to
http://localhost:8000/admin/default/usersocialauth/
to trigger the error relating to the fact that Django 1.9 deprecated and then removed in 1.10 many_meta
functions as part of the "formalization of theModel._meta
api". [Django Reference]This includes
_User._meta.get_all_field_names()
.