Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14199 closed (fixed)

NameError in django.core.cache.backends.db

Reported by: Tim Valenta Owned by: nobody
Component: Core (Cache system) Version: dev
Severity: Keywords: db, cache, NameError
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Lines 127 and 129 in django/core/cache/backends/db.py (http://code.djangoproject.com/browser/django/trunk/django/core/cache/backends/db.py?rev=13473#L127) cause a NameError when executed.

r13473 introduced an update to allow the new Router system to handle the database cache table name, changing the CacheClass variable handling from self._table to the local variable table, derived from table = connections[db].ops.quote_name(self._table). The _cull method in CacheClass must have been missed, as it tries to use the local table variable without first deriving it.

Attachments (1)

patch.diff (593 bytes ) - added by Tim Valenta 14 years ago.
Adds a line to derive local table var

Download all attachments as: .zip

Change History (3)

by Tim Valenta, 14 years ago

Attachment: patch.diff added

Adds a line to derive local table var

comment:1 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [13678]) Fixed #14199 -- Added a missing table creation statement in the db cache backend cull implementation, and added tests for cache culling. Thanks to Tim for the report.

comment:2 by Russell Keith-Magee, 14 years ago

(In [13679]) [1.2.X] Fixed #14199 -- Added a missing table creation statement in the db cache backend cull implementation, and added tests for cache culling. Thanks to Tim for the report.

Backport of r13678 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top