mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Fixed #15888 -- Made tablename argument of createcachetable optional
Thanks Aymeric Augustin for the report and the documentation and Tim Graham for the review.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import os
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.cache import get_cache
|
||||
from django.core.cache.backends.db import BaseDatabaseCache
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.db.backends.sqlite3.creation import DatabaseCreation
|
||||
|
||||
@@ -55,10 +53,7 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||
interactive=False,
|
||||
database=self.connection.alias)
|
||||
|
||||
for cache_alias in settings.CACHES:
|
||||
cache = get_cache(cache_alias)
|
||||
if isinstance(cache, BaseDatabaseCache):
|
||||
call_command('createcachetable', cache._table, database=self.connection.alias)
|
||||
call_command('createcachetable', 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.
|
||||
|
||||
Reference in New Issue
Block a user