jsocol / jsocol/django-adminplus

Pass view objects to template

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
602
Forks
76
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the register_view entry point and where custom_list is assembled. Read how registered views are represented and how custom admin templates consume each custom_list entry. Done means each entry exposes the registered view object alongside its path and name, with the documented example remaining usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.