mirror of
https://github.com/django/django.git
synced 2025-08-08 19:09:15 +00:00
Fixed #25941 -- Improved error message for runtests.py when django is not on path.
This commit is contained in:
parent
e6d57c4d65
commit
3e8b733390
@ -10,7 +10,13 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
try:
|
||||||
import django
|
import django
|
||||||
|
except ImportError as e:
|
||||||
|
raise RuntimeError(
|
||||||
|
'Django module not found, reference tests/README.rst for instructions.'
|
||||||
|
) from e
|
||||||
|
else:
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import connection, connections
|
from django.db import connection, connections
|
||||||
|
Loading…
x
Reference in New Issue
Block a user