Skip to content

Pass view objects to template #50

Open
@jsocol

Description

@jsocol

From my comment:

Groups, I'm actively against supporting here. But there's something I think we could do to help make groups work, that's more of a general solution: adding the view object itself to custom_list, so each entry would look like (path, name, view).

This would let people pass data into the template by attaching it to the view, like:

def my_admin_view(request):
    return render(request, 'my_admin_template.html')
my_admin_view.group = 'group 1'
admin.site.register_view('my-admin-view', view=my_admin_view)

Then they can override the template to group however/wherever they want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions