Opened 16 years ago
Last modified 16 years ago
#9789 closed
compiled settings.py file can't be imported from Jython when using manage.py. — at Version 3
Reported by: | Frank Wierzbicki | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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:
jython mysite/manage.py syncdb
I get:
Error: Could not import settings 'mysite.settings$py' (Is it on sys.path? Does it have syntax errors?): No module named settings$py
I tracked this down to django/core/management/__init__.py
where the .pyc is stripped from compiled CPython files with:
settings_name = os.path.splitext(settings_filename)[0]
which works great for .pyc files, but doesn't strip the $py from the Jython compiled files. I'm attaching a simple patch.
Change History (4)
by , 16 years ago
Attachment: | jython_settings.diff added |
---|
comment:1 by , 16 years ago
Has patch: | set |
---|
comment:2 by , 16 years ago
Component: | Uncategorized → Core framework |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Edited description to stop eyeball bleeding.