omab/django-social-auth — Issue #245: odd design: context_processors.backend_data
Author: derks
Created: 2012-02-09 03:52:25+00:00
State: open

In context_processors.backend_data() ... the 'values' returned are inconsistent with eachother. The 'associated' key contains a list of UserSocialAuth association objects... where 'not_associated' contains a list of provider objects. This makes an odd use case:

{% for provider in social_auth.associated.all %}
Provider is: {{ provider.provider }} (actually association.provider)
{% endfor %}

{% for provider in social_auth.not_associated.all %}
Provider is: {{ provider }} (actually is the provider)
{% endfor %}

If anything, would be helpful to document context processors a bit better. Currently the only mention to the context_processors is in the configuration doc:

Define context processors if needed:

TEMPLATE_CONTEXT_PROCESSORS = (
...
'social_auth.context_processors.social_auth_by_type_backends',
)

check `social_auth.context_processors`.

Where the 'link' at the bottom doesn't link to anything.