﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8706	Django lists *.pyo files as available database backends if you compiled Django in optimized mode	viktor@…	nobody	"One can compile the whole Django package as optimized .pyo files or use it from a script executed by python -OO, which turns on creation of .pyo file. There is a line in [http://code.djangoproject.com/browser/django/trunk/django/db/__init__.py?rev=8424#L28 db/__init__.py] that lists the available backends:

{{{
available_backends = [f for f in os.listdir(backend_dir) if not f.startswith('_') and not f.startswith('.') and not f.endswith('.py') and not f.endswith('.pyc')]
}}}

It lists util.pyo and creation.pyo as available backends. The list should be filtered to include only directories instead. For example:

{{{
available_backends = [f for f in os.listdir(backend_dir) if os.path.isdir(os.path.join(backend_dir, f)]
}}}"		closed	Database layer (models, ORM)	dev		fixed			Accepted	0	0	0	0	0	0
