magic-removal: Fixed #1436 -- Fixed typo in django-admin.py error messages. Thanks, akaihola

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-03-02 05:45:19 +00:00
parent bfbd1a9434
commit 5e6d82a83c
1 changed files with 4 additions and 8 deletions

View File

@ -461,8 +461,7 @@ def install(app):
"Executes the equivalent of 'get_sql_all' in the current database."
from django.db import connection, transaction
app_name = app.__name__[app.__name__.rindex('.')+1:]
app_label = app_name.split('.')[-1]
app_name = app.__name__.split('.')[-2]
# First, try validating the models.
_check_for_validation_errors(app)
@ -479,8 +478,7 @@ def install(app):
* At least one of the database tables already exists.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlall %s'. That's the SQL this command wasn't able to run.
The full error: %s\n""" % \
(app_name, app_label, e))
The full error: %s\n""" % (app_name, app_name, e))
transaction.rollback_unless_managed()
sys.exit(1)
transaction.commit_unless_managed()
@ -491,8 +489,7 @@ def reset(app):
"Executes the equivalent of 'get_sql_reset' in the current database."
from django.db import connection, transaction
from cStringIO import StringIO
app_name = app.__name__[app.__name__.rindex('.')+1:]
app_label = app_name.split('.')[-1]
app_name = app.__name__.split('.')[-2]
# First, try validating the models.
s = StringIO()
@ -521,8 +518,7 @@ Type 'yes' to continue, or 'no' to cancel: """)
* At least one of the database tables already exists.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlreset %s'. That's the SQL this command wasn't able to run.
The full error: %s\n""" % \
(app_name, app_label, e))
The full error: %s\n""" % (app_name, app_name, e))
transaction.rollback_unless_managed()
sys.exit(1)
transaction.commit_unless_managed()