diff --git a/requirements.txt b/requirements.txt index 3bd9718..e01e6b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,3 @@ django-mellon python-ldap gadjo requests -unidecode diff --git a/setup.py b/setup.py index 24f49ee..ddee862 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,6 @@ setup( 'python-ldap', 'gadjo', 'requests', - 'unidecode' ], zip_safe=False, cmdclass={ diff --git a/uauth/organization/management/commands/sync_federations.py b/uauth/organization/management/commands/sync_federations.py index e750bb6..4525ea2 100644 --- a/uauth/organization/management/commands/sync_federations.py +++ b/uauth/organization/management/commands/sync_federations.py @@ -5,11 +5,11 @@ import xml.etree.ElementTree as etree import requests import urlparse import re -import unidecode import lasso from django.conf import settings from django.core.management.base import BaseCommand, CommandError +from django.utils.text import slugify def md_element_name(tag_name): return '{%s}%s' % (lasso.SAML2_METADATA_HREF, tag_name) @@ -17,10 +17,6 @@ def md_element_name(tag_name): def mdui_element_name(tag_name): return '{%s}%s' % (SAML2_METADATA_UI_HREF, tag_name) -def slugify(text): - text = unidecode.unidecode(text).lower() - return re.sub(r'\W+', '-', text) - SAML2_METADATA_UI_HREF = 'urn:oasis:names:tc:SAML:metadata:ui' ENTITY_DESCRIPTOR_TN = md_element_name('EntityDescriptor') ENTITIES_DESCRIPTOR_TN = md_element_name('EntitiesDescriptor')