Skip to content

Commit

Permalink
update context on ModalFormView
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkuty committed Oct 11, 2015
1 parent 28de184 commit 5a6800e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions horizon_contrib/forms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,17 @@ def form_valid(self, form):
# wrong, and we should send back the form as-is.
return self.form_invalid(form)

def get_context_data(self, **kwargs):
context = super(ModalFormView, self).get_context_data(**kwargs)

# add extra context for template
context['url'] = self.request.build_absolute_uri()

return context


class ModelModalView(ModalFormView):

pass


Expand Down

0 comments on commit 5a6800e

Please sign in to comment.