Django Overriding Context Data in Class Based Views
def get_context_data(self, **kwargs):
form = self.get_form(self.form_class)
context = {'form': form}
context.update(kwargs)
return super(ProjectListView, self).get_context_data(**context)
Written by Gerald Goh
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#