Changeset 2985
- Timestamp:
- 05/26/06 00:20:21 (2 years ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/core/management.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r2982 r2985 66 66 Jason Huggins <http://www.jrandolph.com/blog/> 67 67 Michael Josephson <http://www.sdjournal.com/> 68 jpellerin@gmail.com 68 69 junzhang.jn@gmail.com 69 70 Russell Keith-Magee <freakboy@iinet.net.au> django/trunk/django/core/management.py
r2946 r2985 329 329 output = [] 330 330 331 # Some backends can't execute more than one SQL statement at a time, 332 # so split into separate statements. 333 sql_expr = re.compile( 334 r"""( # each statement is... 335 (?: # one or more chunks of ... 336 (?:[^;'"]+) # not the end of a statement or start of a quote 337 | (?:'[^']+') # something in single quotes 338 | (?:"[^"]+") # something in double quotes 339 )+)""", re.VERBOSE) 340 331 341 # Find custom SQL, if it's available. 332 342 sql_files = [os.path.join(app_dir, "%s.%s.sql" % (opts.object_name.lower(), settings.DATABASE_ENGINE)), … … 335 345 if os.path.exists(sql_file): 336 346 fp = open(sql_file) 337 output. append(fp.read())347 output.extend(sql_expr.findall(fp.read())) 338 348 fp.close() 339 349
