Skip to content

Commit

Permalink
fix model factory on dj 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkuty committed Jul 19, 2015
1 parent 45ee281 commit 20f1d3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions horizon_contrib/forms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def object(self):

try:
obj = self.model.objects.get(id=self.kwargs["id"])
except Exception, e:
except Exception as e:
raise e
return obj

Expand All @@ -171,7 +171,8 @@ def get_form_class(self):
# If this view is operating on a single object, use
# the class of that object
model = self.object.__class__
return model_forms.modelform_factory(model, form=SelfHandlingModelForm)
return model_forms.modelform_factory(model, exclude=[],
form=SelfHandlingModelForm)


class CreateView(ModelFormMixin, ModalFormView, ContextMixin):
Expand Down

0 comments on commit 20f1d3b

Please sign in to comment.