Lucas, On Fri, Nov 22, 2013 at 9:58 AM, Lucas Magnum <lucasmagn...@gmail.com> wrote: > Timothy, > The "get_context_data" is called in get method, once you override it > "get_context_data" isn't called anymore. >
Right. So my thought process was that if I override it and place additional information there it would be available in the template. Obviously my thinking is incorrect, but where? So how do I add variables to the context so that I can display their value in the template? In this case I want to get the title of the paper and display it in the template. If I do this in get(): def get(self, request, *args, **kwargs): paper = Paper.objects.filter(id=kwargs['pk']) kwargs['title'] = paper[0].title print('Title: ',kwargs['title']) form = self.form_class(initial=self.initial) return render(request, self.template_name, {'form': form}) IT prints it to the terminal okay. But (using DjDT) I do not see where 'title' was added to kwargs. Not do I see it in the template context. Any idea what I am missing or how to do this? Thanks, Tim -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VuP%2B1m2qajT2myzt3jwXns9tq6aJL_JvuVKNnfJWC93Q%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.