Changes between Initial Version and Version 3 of Ticket #9789
- Timestamp:
- Dec 9, 2008, 7:38:49 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9789
- Property Has patch set
- Property Component Uncategorized → Core framework
- Property Triage Stage Unreviewed → Accepted
-
Ticket #9789 – Description
initial v3 1 1 When 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 {{{ 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: 2 10 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 {{{ 11 12 settings_name = os.path.splitext(settings_filename)[0] 13 }}} 12 14 13 15 which works great for .pyc files, but doesn't strip the $py from the Jython compiled files. I'm attaching a simple patch.