﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2452	"[PATCH] Allow to use comments in the ""initial sql data"" files."	Pawel J. Sawicki (http://pjs.name)	Adrian Holovaty	"In order to allow comments to be placed in the initial sql data files (http://www.djangoproject.com/documentation/model_api/#providing-initial-sql-data) the following patch may be used:

{{{
$ svn diff management.py
Index: management.py
===================================================================
--- management.py       (revision 3496)
+++ management.py       (working copy)
@@ -499,7 +499,9 @@
                     print ""Installing initial data for %s model"" % model._meta.object_name
                     try:
                         for sql in initial_sql:
-                            cursor.execute(sql)
+                               # Allow to use comments in the initial sql data files.
+                               if not sql.strip().startswith('--'):
+                                   cursor.execute(sql)
                     except Exception, e:
                         sys.stderr.write(""Failed to install initial SQL data for %s model: %s"" % \
                                             (model._meta.object_name, e))
}}}"	enhancement	closed	Core (Other)		minor	fixed			Unreviewed	0	0	0	0	0	0
