Created
February 20, 2013 02:49
-
-
Save garrypolley/4992377 to your computer and use it in GitHub Desktop.
Create X number of extra formsets
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
def create_form_sets(number_to_make=None): | |
""" | |
Use this to make number_to_make form sets. | |
""" | |
number = number_to_make or 0 | |
return formset_factory(MyForm, | |
extra=number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment