Fixed #2015 -- Fixed sqlinitialdata regexp to handle empty string insertions. Thanks, Steven Armstrong
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
037f8d5804
commit
d3b1a9ba39
|
@ -334,8 +334,8 @@ def get_sql_initial_data_for_model(model):
|
||||||
r"""( # each statement is...
|
r"""( # each statement is...
|
||||||
(?: # one or more chunks of ...
|
(?: # one or more chunks of ...
|
||||||
(?:[^;'"]+) # not the end of a statement or start of a quote
|
(?:[^;'"]+) # not the end of a statement or start of a quote
|
||||||
| (?:'[^']+') # something in single quotes
|
| (?:'[^']*') # something in single quotes
|
||||||
| (?:"[^"]+") # something in double quotes
|
| (?:"[^"]*") # something in double quotes
|
||||||
)+)""", re.VERBOSE)
|
)+)""", re.VERBOSE)
|
||||||
|
|
||||||
# Find custom SQL, if it's available.
|
# Find custom SQL, if it's available.
|
||||||
|
|
Loading…
Reference in New Issue