1
0
mirror of https://github.com/django/django.git synced 2025-03-10 09:22:46 +00:00

Updated links to point to dev documentation.

This commit is contained in:
Markus Holtermann 2014-09-08 14:15:33 +02:00 committed by Tim Graham
parent d28b5f13b3
commit d4467ede77

View File

@ -333,12 +333,13 @@ class MigrationWriter(object):
module = import_module(module_name) module = import_module(module_name)
if not hasattr(module, value.__name__): if not hasattr(module, value.__name__):
raise ValueError( raise ValueError(
"Could not find function %s in %s.\nPlease note that " "Could not find function %s in %s.\n"
"due to Python 2 limitations, you cannot serialize " "Please note that due to Python 2 limitations, you cannot "
"unbound method functions (e.g. a method declared\n" "serialize unbound method functions (e.g. a method "
"and used in the same class body). Please move the " "declared and used in the same class body). Please move "
"function into the main module body to use migrations.\n" "the function into the main module body to use migrations.\n"
"For more information, see https://docs.djangoproject.com/en/1.7/topics/migrations/#serializing-values" "For more information, see "
"https://docs.djangoproject.com/en/dev/topics/migrations/#serializing-values"
% (value.__name__, module_name)) % (value.__name__, module_name))
return "%s.%s" % (module_name, value.__name__), set(["import %s" % module_name]) return "%s.%s" % (module_name, value.__name__), set(["import %s" % module_name])
# Classes # Classes