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
''' Django ORM don't support to pull id from sequence by default.''' | |
def update_id(func): | |
'''A decorator for pulling a data object's ID value out of a | |
user-defined sequence. This gets around a limitation in | |
django whereby we cannot supply our own sequence names.''' | |
def decorated_function(*args): | |
# Grab a reference to the data object we want to update. | |
data_object = args[0] |