mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
boulder-oracle-sprint: Merged to [4065]
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4066 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -393,6 +393,8 @@ def get_sql_initial_data_for_model(model):
|
||||
if os.path.exists(sql_file):
|
||||
fp = open(sql_file, 'U')
|
||||
for statement in statements.split(fp.read()):
|
||||
# Remove any comments from the file
|
||||
statement = re.sub(r"--.*[\n\Z]", "", statement)
|
||||
if statement.strip():
|
||||
output.append(statement + ";")
|
||||
fp.close()
|
||||
|
||||
Reference in New Issue
Block a user