This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import binascii | |
def crc32(val): | |
"""Have to do this with binascii's crc32 which is signed (MySQL's is unsigned)""" | |
return binascii.crc32(val) & 0xffffffff | |
def crc32_of(other_field): | |
"""Context sensitive default for SQLAlchemy inserts | |
Usage (in model definition): |
NewerOlder