jsocol / jsocol/django-adminplus
Pass view objects to template
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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