Loading django/db/migrations/autodetector.py +2 −2 Original line number Diff line number Diff line Loading @@ -367,9 +367,9 @@ class InteractiveMigrationQuestioner(MigrationQuestioner): return result[0].lower() == "y" def _choice_input(self, question, choices): print question print(question) for i, choice in enumerate(choices): print " %s) %s" % (i + 1, choice) print(" %s) %s" % (i + 1, choice)) result = input("Select an option: ") while True: try: Loading django/db/migrations/graph.py +2 −2 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class MigrationGraph(object): """ roots = set() for node in self.nodes: if not filter(lambda key: key[0] == node[0], self.dependencies.get(node, set())): if not any(key[0] == node[0] for key in self.dependencies.get(node, set())): roots.add(node) return roots Loading @@ -84,7 +84,7 @@ class MigrationGraph(object): """ leaves = set() for node in self.nodes: if not filter(lambda key: key[0] == node[0], self.dependents.get(node, set())): if not any(key[0] == node[0] for key in self.dependents.get(node, set())): leaves.add(node) return leaves Loading django/db/migrations/writer.py +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ class MigrationWriter(object): elif isinstance(value, (datetime.datetime, datetime.date)): return repr(value), set(["import datetime"]) # Simple types elif isinstance(value, (int, long, float, six.binary_type, six.text_type, bool, types.NoneType)): elif isinstance(value, six.integer_types + (float, six.binary_type, six.text_type, bool, type(None))): return repr(value), set() # Django fields elif isinstance(value, models.Field): Loading Loading
django/db/migrations/autodetector.py +2 −2 Original line number Diff line number Diff line Loading @@ -367,9 +367,9 @@ class InteractiveMigrationQuestioner(MigrationQuestioner): return result[0].lower() == "y" def _choice_input(self, question, choices): print question print(question) for i, choice in enumerate(choices): print " %s) %s" % (i + 1, choice) print(" %s) %s" % (i + 1, choice)) result = input("Select an option: ") while True: try: Loading
django/db/migrations/graph.py +2 −2 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class MigrationGraph(object): """ roots = set() for node in self.nodes: if not filter(lambda key: key[0] == node[0], self.dependencies.get(node, set())): if not any(key[0] == node[0] for key in self.dependencies.get(node, set())): roots.add(node) return roots Loading @@ -84,7 +84,7 @@ class MigrationGraph(object): """ leaves = set() for node in self.nodes: if not filter(lambda key: key[0] == node[0], self.dependents.get(node, set())): if not any(key[0] == node[0] for key in self.dependents.get(node, set())): leaves.add(node) return leaves Loading
django/db/migrations/writer.py +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ class MigrationWriter(object): elif isinstance(value, (datetime.datetime, datetime.date)): return repr(value), set(["import datetime"]) # Simple types elif isinstance(value, (int, long, float, six.binary_type, six.text_type, bool, types.NoneType)): elif isinstance(value, six.integer_types + (float, six.binary_type, six.text_type, bool, type(None))): return repr(value), set() # Django fields elif isinstance(value, models.Field): Loading