﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23050	Context Dictionary	petkostas@…	nobody	"It would be nice to add a class attribute that holds small data instead of overriding everytime the get_context_data for small bits of elements.
To make this more clear, think of a Form which is handled by a CreateView, for DRY I would use a single add.html template (instead of repeating the template for each app), now since there are a lot of developers out there that use a custom type of admin interface, it would be nice if we could pass some data to the template without having to override the get_context_data, for example:

{{{
from django.views import generic

class PageCreateView(generic.CreateView):
    model = Page
    template_name = ""myproject/forms/add.html""

    def get_context_data(self, *args, **kwargs):
        context = super(PageCreateView, self).get_context_data(*args, **kwargs)
        context['header'] = 'Add a new page'
        return context
}}}

Instead we could:


{{{
from django.views import generic

class PageCreateView(generic.CreateView):
    model = Page
    exta_context = {""header"":""Add a new page""}
    template_name = ""myproject/forms/add.html""
}}}"	New feature	closed	Generic views	1.7-rc-1	Normal	worksforme	context, Class Based Views		Unreviewed	0	0	0	0	0	0
