问题 I am trying to generate a Graphene schema from a Django model. I am trying to do this by iterating through the apps then the models and then adding the appropriate attributes to the generated schema. This is the code: registry = {} def register(target_class): registry[target_class.__name__] = target_class def c2u(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() def s2p(name): s1 = re.sub("y$", "ie", name) return "{}s".format(s1)