Kaydet (Commit) d238ab29 authored tarafından Marc Tamlyn's avatar Marc Tamlyn

Silence deprecation warnings.

Also they should only be raised if allow_syncdb does exist, not just if
allow_migrate does not.

Refs comments on 25084101
üst d2562200
......@@ -268,11 +268,11 @@ class ConnectionRouter(object):
try:
method = router.allow_migrate
except AttributeError:
method = router.allow_syncdb
warnings.warn(
'Router.allow_syncdb has been deprecated and will stop working in Django 1.9.'
'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
except AttributeError:
# If the router doesn't have a method, skip to the next one.
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment