Here are the examples of the python api django.utils.six.moves.builtins.__name__ taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: django
Source File:
View license
    def serialize(self):
        special_cases = [
            (models.Model, "models.Model", []),
        for case, string, imports in special_cases:
            if case is self.value:
                return string, set(imports)
        if hasattr(self.value, "__module__"):
            module = self.value.__module__
            if module == six.moves.builtins.__name__:
                return self.value.__name__, set()
                return "%s.%s" % (module, self.value.__name__), {"import %s" % module}