Loading django/core/management/sql.py +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ def custom_sql_for_model(model, style, connection): sql_files.append(os.path.join(app_dir, "%s.sql" % opts.model_name)) for sql_file in sql_files: if os.path.exists(sql_file): with codecs.open(sql_file, 'r' if six.PY3 else 'U', encoding=settings.FILE_CHARSET) as fp: with codecs.open(sql_file, 'r', encoding=settings.FILE_CHARSET) as fp: output.extend(connection.ops.prepare_sql_script(fp.read(), _allow_fallback=True)) return output Loading Loading
django/core/management/sql.py +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ def custom_sql_for_model(model, style, connection): sql_files.append(os.path.join(app_dir, "%s.sql" % opts.model_name)) for sql_file in sql_files: if os.path.exists(sql_file): with codecs.open(sql_file, 'r' if six.PY3 else 'U', encoding=settings.FILE_CHARSET) as fp: with codecs.open(sql_file, 'r', encoding=settings.FILE_CHARSET) as fp: output.extend(connection.ops.prepare_sql_script(fp.read(), _allow_fallback=True)) return output Loading