Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Silence deprecation warnings.

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

Refs comments on 2508410
  • Loading branch information...
commit d238ab29915b24bb717b3fdc2d552c65a43ba9ab 1 parent d256220
@mjtamlyn mjtamlyn authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/utils.py
View
4 django/db/utils.py
@@ -268,11 +268,11 @@ def allow_migrate(self, db, model):
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
Please sign in to comment.
Something went wrong with that request. Please try again.