Fixed #6650 -- Added UTF-8 encoding to SQL output provided by management commands. Thanks to farcaller for the suggestion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2008-06-19 14:38:56 +00:00
parent e726065d5d
commit 5d09d8769d
8 changed files with 8 additions and 8 deletions

View File

@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.core.management.sql import sql_create from django.core.management.sql import sql_create
return '\n'.join(sql_create(app, self.style)) return u'\n'.join(sql_create(app, self.style)).encode('utf-8')

View File

@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.core.management.sql import sql_all from django.core.management.sql import sql_all
return '\n'.join(sql_all(app, self.style)) return u'\n'.join(sql_all(app, self.style)).encode('utf-8')

View File

@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.core.management.sql import sql_delete from django.core.management.sql import sql_delete
return '\n'.join(sql_delete(app, self.style)) return u'\n'.join(sql_delete(app, self.style)).encode('utf-8')

View File

@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.core.management.sql import sql_custom from django.core.management.sql import sql_custom
return '\n'.join(sql_custom(app)) return u'\n'.join(sql_custom(app)).encode('utf-8')

View File

@ -7,4 +7,4 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options): def handle_noargs(self, **options):
from django.core.management.sql import sql_flush from django.core.management.sql import sql_flush
return '\n'.join(sql_flush(self.style, only_django=True)) return u'\n'.join(sql_flush(self.style, only_django=True)).encode('utf-8')

View File

@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.core.management.sql import sql_indexes from django.core.management.sql import sql_indexes
return '\n'.join(sql_indexes(app, self.style)) return u'\n'.join(sql_indexes(app, self.style)).encode('utf-8')

View File

@ -7,4 +7,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.core.management.sql import sql_reset from django.core.management.sql import sql_reset
return '\n'.join(sql_reset(app, self.style)) return u'\n'.join(sql_reset(app, self.style)).encode('utf-8')

View File

@ -6,4 +6,4 @@ class Command(AppCommand):
def handle_app(self, app, **options): def handle_app(self, app, **options):
from django.db import connection, models from django.db import connection, models
return '\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app))) return u'\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app))).encode('utf-8')