mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-15 06:08:59 +03:00
cc3bd05472
Closes #1014
7 lines
133 B
Python
7 lines
133 B
Python
import re
|
|
from text_unidecode import unidecode
|
|
|
|
|
|
def to_const(string):
|
|
return re.sub(r"[\W|^]+", "_", unidecode(string)).upper()
|