Skip to content

Instantly share code, notes, and snippets.

@frankjwu
frankjwu / schemas.py
Created July 20, 2017 18:42
Form/FormInstance versioning
class VisitSchema():
...
forms = fields.Method('forms_data')
@staticmethod
def forms_data(visit):
forms = []
for form in visit.forms_versioned:
# Full implementation would need another level for the form_fields