Removed fallback suport for allow_syncdb() in database routers per deprecation timeline.

This commit is contained in:
Tim Graham 2014-11-18 11:27:38 -05:00
parent b952c3fc60
commit d79a30ba3f
1 changed files with 1 additions and 8 deletions

View File

@ -319,14 +319,7 @@ class ConnectionRouter(object):
def allow_migrate(self, db, model, **hints): def allow_migrate(self, db, model, **hints):
for router in self.routers: for router in self.routers:
try: try:
try: method = router.allow_migrate
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. '
'Rename the method to allow_migrate.',
RemovedInDjango19Warning, stacklevel=2)
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.
pass pass