Raise (pending) deprecation warning for allow_syncdb.

This commit is contained in:
Marc Tamlyn 2014-02-09 11:40:23 +00:00
parent 2085f53f56
commit 250841017c
1 changed files with 4 additions and 0 deletions

View File

@ -268,6 +268,10 @@ class ConnectionRouter(object):
try: try:
method = router.allow_migrate method = router.allow_migrate
except AttributeError: except AttributeError:
warnings.warn(
'Router.allow_syncdb has been deprecated and will stop working in Django 1.9.'
'Rename the method to allow_migrate.',
PendingDeprecationWarning, stacklevel=2)
method = router.allow_syncdb method = router.allow_syncdb
except AttributeError: except AttributeError:
# If the router doesn't have a method, skip to the next one. # If the router doesn't have a method, skip to the next one.