Skip to content

Commit

Permalink
added biblion object to context of PostCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Nov 14, 2011
1 parent 5dff34c commit d94f7af
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions biblion/views.py
Expand Up @@ -71,6 +71,13 @@ def get_form_kwargs(self):
})
return kwargs

def get_context_data(self, **kwargs):
ctx = super(PostCreate, self).get_context_data(**kwargs)
ctx.update({
"biblion": self.biblion,
})
return ctx

@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
self.biblion = get_object_or_404(Biblion, slug=kwargs["slug"])
Expand Down

0 comments on commit d94f7af

Please sign in to comment.