Opened 10 years ago
Closed 10 years ago
#26484 closed Cleanup/optimization (fixed)
Add a helpful message in manage.py when Django cannot be imported
| Reported by: | Tim Graham | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Other) | Version: | dev |
| Severity: | Normal | 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
As discussed on a pull request and on django-developers.
The first commit is 724a279849a5cd09cdb5ef201fe6958a4c26fe73 but the issue is reopened after some concerns about the possibility of masking imports on Python 2.
Change History (5)
comment:1 by , 10 years ago
| Has patch: | set |
|---|
comment:2 by , 10 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 10 years ago
In 724a279849a5cd09cdb5ef201fe6958a4c26fe73:
Raised a more helpful ImportError message in manage.py template.
comment:5 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I implemented Shai's suggestion to catch the original exception, then try
import djangoand display the helpful message if that fails or reraise the original exception if not.