mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Fixed #15255 -- Stopped database cache from ignoring database routers when creating the cache table. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -33,9 +33,7 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||
for cache_alias in settings.CACHES:
|
||||
cache = get_cache(cache_alias)
|
||||
if isinstance(cache, BaseDatabaseCache):
|
||||
from django.db import router
|
||||
if router.allow_syncdb(self.connection.alias, cache.cache_model_class):
|
||||
call_command('createcachetable', cache._table, database=self.connection.alias)
|
||||
call_command('createcachetable', cache._table, database=self.connection.alias)
|
||||
# Get a cursor (even though we don't need one yet). This has
|
||||
# the side effect of initializing the test database.
|
||||
cursor = self.connection.cursor()
|
||||
|
||||
Reference in New Issue
Block a user