jazzband / jazzband/django-model-utils

Feature: Adding methods for admin

Open
#397 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.