summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchillaranand <anand21nanda@gmail.com>2017-06-14 18:11:24 +0530
committerTim Graham <timograham@gmail.com>2017-06-14 10:10:22 -0400
commit451b585c2f76507b1be9d855a41cf2bb5aad6026 (patch)
treeb09add3f5d44665a9877463f5b8bb0328b250e52
parentfb0f987f7de5f01d72c671444df0f95de4706fc6 (diff)
Refs #27914 -- Used __qualname__ in model operations' deconstruct().
-rw-r--r--django/db/migrations/operations/models.py22
-rw-r--r--django/db/migrations/operations/special.py6
2 files changed, 14 insertions, 14 deletions
diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py
index 7daf8a7eec..9754181e84 100644
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -71,7 +71,7 @@ class CreateModel(ModelOperation):
if self.managers and self.managers != [('objects', models.Manager())]:
kwargs['managers'] = self.managers
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -232,7 +232,7 @@ class DeleteModel(ModelOperation):
'name': self.name,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -276,7 +276,7 @@ class RenameModel(ModelOperation):
'new_name': self.new_name,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -429,7 +429,7 @@ class AlterModelTable(ModelOperation):
'table': self.table,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -505,7 +505,7 @@ class AlterUniqueTogether(FieldRelatedOptionOperation):
'unique_together': self.unique_together,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -559,7 +559,7 @@ class AlterIndexTogether(FieldRelatedOptionOperation):
'index_together': self.index_together,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -608,7 +608,7 @@ class AlterOrderWithRespectTo(FieldRelatedOptionOperation):
'order_with_respect_to': self.order_with_respect_to,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -683,7 +683,7 @@ class AlterModelOptions(ModelOptionOperation):
'options': self.options,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -718,7 +718,7 @@ class AlterModelManagers(ModelOptionOperation):
def deconstruct(self):
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[self.name, self.managers],
{}
)
@@ -781,7 +781,7 @@ class AddIndex(IndexOperation):
'index': self.index,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs,
)
@@ -827,7 +827,7 @@ class RemoveIndex(IndexOperation):
'name': self.name,
}
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs,
)
diff --git a/django/db/migrations/operations/special.py b/django/db/migrations/operations/special.py
index 89fd9baa64..5a8510ec02 100644
--- a/django/db/migrations/operations/special.py
+++ b/django/db/migrations/operations/special.py
@@ -24,7 +24,7 @@ class SeparateDatabaseAndState(Operation):
if self.state_operations:
kwargs['state_operations'] = self.state_operations
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -87,7 +87,7 @@ class RunSQL(Operation):
if self.hints:
kwargs['hints'] = self.hints
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)
@@ -164,7 +164,7 @@ class RunPython(Operation):
if self.hints:
kwargs['hints'] = self.hints
return (
- self.__class__.__name__,
+ self.__class__.__qualname__,
[],
kwargs
)