diff options
author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-02-09 17:47:40 +0000 |
---|---|---|
committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-02-09 17:48:15 +0000 |
commit | d238ab29915b24bb717b3fdc2d552c65a43ba9ab (patch) | |
tree | a5e1ef0008a421347e0336cce266ea2792f54427 /django/db/utils.py | |
parent | d25622000ac8a591101ade28708d3b4b8ae4b24f (diff) | |
download | django-d238ab29915b24bb717b3fdc2d552c65a43ba9ab.tar.gz |
Silence deprecation warnings.
Also they should only be raised if allow_syncdb does exist, not just if
allow_migrate does not.
Refs comments on 250841017c6c456806cadd214b4e130aa998233d
Diffstat (limited to 'django/db/utils.py')
-rw-r--r-- | django/db/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/utils.py b/django/db/utils.py index 0be6d6a7cb..b7303351d9 100644 --- a/django/db/utils.py +++ b/django/db/utils.py @@ -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 |