Created
May 12, 2016 11:25
-
-
Save sivabudh/9f0296816e7df487eb4c672afac13965 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
class FranchiseUpdateView(viewsmixins.UpdateViewMixins): | |
model = Franchise | |
template_name = "franchise_update.html" | |
success_url = reverse_lazy('franchises:list') | |
form_class = FranchiseForm | |
form_prefix = "franchise" | |
# set prefix to parent form | |
def get_form_kwargs(self): | |
kwargs = super(FranchiseUpdateView, self).get_form_kwargs() | |
if self.form_prefix: | |
kwargs.update({'prefix': self.form_prefix}) | |
return kwargs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment