Changes between Initial Version and Version 3 of Ticket #9789


Ignore:
Timestamp:
Dec 9, 2008, 7:38:49 PM (16 years ago)
Author:
Malcolm Tredinnick
Comment:

Edited description to stop eyeball bleeding.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9789

    • Property Has patch set
    • Property Component UncategorizedCore framework
    • Property Triage Stage UnreviewedAccepted
  • Ticket #9789 – Description

    initial v3  
    11When running manage.py functions that depend on settings.py, Django errors out if the file has been compiled to settings$py.class in Jython.  For example, when I run:
     2{{{
     3jython mysite/manage.py syncdb
     4}}}
     5I get:
     6{{{
     7Error: Could not import settings 'mysite.settings$py' (Is it on sys.path? Does it have syntax errors?): No module named settings$py
     8}}}
     9I tracked this down to `django/core/management/__init__.py` where the .pyc is stripped from compiled CPython files with:
    210
    3 jython mysite/manage.py syncdb
    4 
    5 I get:
    6 
    7 Error: Could not import settings 'mysite.settings$py' (Is it on sys.path? Does it have syntax errors?): No module named settings$py
    8 
    9 I tracked this down to django/core/management/__init__.py where the .pyc is stripped from compiled CPython files with:
    10 
     11{{{
    1112settings_name = os.path.splitext(settings_filename)[0]
     13}}}
    1214
    1315which works great for .pyc files, but doesn't strip the $py from the Jython compiled files.  I'm attaching a simple patch.
Back to Top