1
0
mirror of https://github.com/django/django.git synced 2025-10-28 16:16:12 +00:00

Fixed #20841 -- Added messages to NotImplementedErrors

Thanks joseph at vertstudios.com for the suggestion.
This commit is contained in:
Gregor MacGregor
2013-09-06 13:24:52 -05:00
committed by Tim Graham
parent d59f1993f1
commit b2b763448f
26 changed files with 96 additions and 95 deletions

View File

@@ -38,14 +38,14 @@ class Operation(object):
Takes the state from the previous migration, and mutates it
so that it matches what this migration would perform.
"""
raise NotImplementedError()
raise NotImplementedError('subclasses of Operation must provide a state_forwards() method')
def database_forwards(self, app_label, schema_editor, from_state, to_state):
"""
Performs the mutation on the database schema in the normal
(forwards) direction.
"""
raise NotImplementedError()
raise NotImplementedError('subclasses of Operation must provide a database_forwards() method')
def database_backwards(self, app_label, schema_editor, from_state, to_state):
"""
@@ -53,7 +53,7 @@ class Operation(object):
direction - e.g. if this were CreateModel, it would in fact
drop the model's table.
"""
raise NotImplementedError()
raise NotImplementedError('subclasses of Operation must provide a database_backwards() method')
def describe(self):
"""