Django lists *.pyo files as available database backends if you compiled Django in optimized mode
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 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)]
Change History
(4)
milestone: |
→ 1.1
|
Triage Stage: |
Unreviewed → Accepted
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Not 1.0 material. That list is only used for diagnostics; this can wait.