"""URLs module"""
from django.conf import settings
try:
    from django.conf.urls import patterns, url
except ImportError:
    # Django < 1.4
    from django.conf.urls.defaults import patterns, url


from social.utils import setting_name


extra = getattr(settings, setting_name('TRAILING_SLASH'), True) and '/' or ''


urlpatterns = patterns('social.apps.django_app.views',
    # authentication / association
    url(r'^login/(?P<backend>[^/]+){0}$'.format(extra), 'auth',
        name='begin'),
    url(r'^complete/(?P<backend>[^/]+){0}$'.format(extra), 'complete',
        name='complete'),
    # disconnection
    url(r'^disconnect/(?P<backend>[^/]+){0}$'.format(extra), 'disconnect',
        name='disconnect'),
    url(r'^disconnect/(?P<backend>[^/]+)/(?P<association_id>[^/]+){0}$'
            .format(extra), 'disconnect', name='disconnect_individual'),
)

"""URLs module"""
from django.conf import settings
try:
    from django.conf.urls import url
except ImportError:
    # Django < 1.4
    from django.conf.urls.defaults import url


from social.utils import setting_name
from social.apps.django_app import views


extra = getattr(settings, setting_name('TRAILING_SLASH'), True) and '/' or ''


urlpatterns = [
    # authentication / association
    url(r'^login/(?P<backend>[^/]+){0}$'.format(extra), views.auth,
        name='begin'),
    url(r'^complete/(?P<backend>[^/]+){0}$'.format(extra), views.complete,
        name='complete'),
    # disconnection
    url(r'^disconnect/(?P<backend>[^/]+){0}$'.format(extra), views.disconnect,
        name='disconnect'),
    url(r'^disconnect/(?P<backend>[^/]+)/(?P<association_id>[^/]+){0}$'
        .format(extra), views.disconnect, name='disconnect_individual'),
]

Fix Django 1.10 deprecation warnings
Fix Django 1.10 deprecation warnings

In django_app/urls.py:
* Use a list instead of `patterns`
* Use view callables instead of strings

Fixes #804, #754
