Ticket #8461: sql_py.diff

File sql_py.diff, 666 bytes (added by niccl, 16 years ago)
  • django/core/management/sql.py

     
    184184            fp = open(sql_file, 'U')
    185185            for statement in statements.split(fp.read().decode(settings.FILE_CHARSET)):
    186186                # Remove any comments from the file
    187                 statement = re.sub(ur"--.*([\n\Z]|$)", "", statement)
     187                statement = re.sub(ur"(--|#).*([\n\Z]|$)", "", statement)
    188188                if statement.strip():
    189189                    output.append(statement + u";")
    190190            fp.close()
Back to Top