jazzband / jazzband/django-model-utils
Feature: Adding methods for admin
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 374
- PR merge metrics
- No merged PRs in 30d
Description
## Feature
I'm not sure whether this would fit in this library. But there are a few helper methods I constantly tend to write when working with admin to get the urls of admin etc.
It would be nice if these were in a library that you could pip install. Let me know if you don't think these fit in this repo and I'll close the issue.
```
def get_admin_name(model, url_name):
name = '{}_{}_{}'.format(
model._meta.app_label,
model._meta.model_name,
url_name
)
return name
def reverse_admin_name(model, name, args=None, kwargs=None):
name = get_admin_name(model, name)
url = reverse('admin:{}'.format(name), args=args, kwargs=kwargs)
return url
```
Contributor guide
Research direction
The issue proposes get_admin_name and reverse_admin_name helpers for Django admin URLs, but names no repository files, tests, or entry point. First review the project's existing utility modules and Django admin URL conventions, then confirm with maintainers whether this belongs in django-model-utils and what tests and supported API should define done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100