#8706: Django lists *.pyo files as available database backends if you compiled
Django in optimized mode
-------------------------------+--------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  nobody    
   Status:  new                |   Milestone:  1.0       
Component:  Database wrapper   |     Version:  SVN       
 Keywords:                     |       Stage:  Unreviewed
Has_patch:  0                  |  
-------------------------------+--------------------------------------------
 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)]
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8706>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to