Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Breadcrumb urls lead to error page #46

Open
pakal opened this issue Jun 18, 2019 · 1 comment
Open

Breadcrumb urls lead to error page #46

pakal opened this issue Jun 18, 2019 · 1 comment

Comments

@pakal
Copy link

pakal commented Jun 18, 2019

Thansk for this package

Here is a little buglet : when I group models together under a single app-name, clicking on "cross referenced" models will lead to a page where their breadcrumb still references their real parent app. Clicking on this url will lead to an empty page, since the origianl app of these models is not listed in ADMIN_REORDER.

@frnhr
Copy link

frnhr commented Apr 25, 2020

FWIW, my little workaround for this issue:

  1. define a redirect url
  2. change verbose_name for the app

"1." solves the 404 and "2." makes it look nice.

I have a custom user model in project's users app and I wanted to move this model into the contrib.auth app / section. I suspect this is a fairly common use case.

# urls.py
path("admin/users/", RedirectView.as_view(url="/admin/auth/")),
# users/apps.py
class UsersConfig(AppConfig):
    name = "users"
    verbose_name = "Authentication and Authorization"

# users/__init__.py
default_app_config = 'users.apps.UsersConfig'

This is a bodge solution... works ok if there are no other models in the app in the admin, otherwise not applicable.

I would love to see a proper solution for this, but fear it might be very complicated :(

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

No branches or pull requests

2 participants