django-social-widgets
django-social-widgets copied to clipboard
assignment_tag deprecated in Django 1.9
@register.assignment_tag causes error on runserver
Changed :
def social_get_facebook_locale(locale):
"""
Normalize the locale string and split the value needed for the api url
"""
if locale is None:
return 'en_US'
return normalize(locale).split('.')[0]
To:
@register.simple_tag
def social_get_facebook_locale(locale):
"""
Normalize the locale string and split the value needed for the api url
"""
if locale is None:
return 'en_US'
return normalize(locale).split('.')[0]