mirror of
https://github.com/django/django.git
synced 2025-06-29 15:29:13 +00:00
magic-removal: Fixed #1197: Fixed validation error message in django-admin. Thanks, Andreas
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1edaa09f25
commit
3d293b5144
@ -462,7 +462,7 @@ def init_minimal():
|
|||||||
from django.conf.settings import INSTALLED_APPS
|
from django.conf.settings import INSTALLED_APPS
|
||||||
INSTALLED_APPS += ('django.contrib.contenttypes',)
|
INSTALLED_APPS += ('django.contrib.contenttypes',)
|
||||||
# Install django.contrib.contenttypes. The tests require Packages to
|
# Install django.contrib.contenttypes. The tests require Packages to
|
||||||
# to be installed. This ought to be fixed (tests should probably
|
# to be installed. This ought to be fixed (tests should probably
|
||||||
# install their dependencies)
|
# install their dependencies)
|
||||||
contenttypes_app = models.get_app('contenttypes')
|
contenttypes_app = models.get_app('contenttypes')
|
||||||
install(contenttypes_app)
|
install(contenttypes_app)
|
||||||
@ -526,7 +526,7 @@ def install(app):
|
|||||||
s = StringIO()
|
s = StringIO()
|
||||||
num_errors = get_validation_errors(s)
|
num_errors = get_validation_errors(s)
|
||||||
if num_errors:
|
if num_errors:
|
||||||
sys.stderr.write("Error: %s couldn't be installed, because there were errors in your model:\n" % mod_name)
|
sys.stderr.write("Error: %s couldn't be installed, because there were errors in your model:\n" % app_name)
|
||||||
s.seek(0)
|
s.seek(0)
|
||||||
sys.stderr.write(s.read())
|
sys.stderr.write(s.read())
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user