Last active
January 17, 2017 15:35
-
-
Save kyle-eshares/f702dee68241e70f7187377ed8b6f8e7 to your computer and use it in GitHub Desktop.
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
from django.db import connection | |
def flatten(*args): | |
def transform_pipeline(mdl): | |
data = FlatData() | |
num_before = len(connection.queries) | |
for fn in args: | |
fn(data, mdl) | |
assert len(connection.queries) == num_before | |
return data | |
return transform_pipeline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment