Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass view objects to template #50

Open
jsocol opened this issue May 28, 2016 · 0 comments
Open

Pass view objects to template #50

jsocol opened this issue May 28, 2016 · 0 comments

Comments

@jsocol
Copy link
Owner

jsocol commented May 28, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant