Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detail_info.html template is incompatible with custom Image models #1450

Closed
W1ldPo1nter opened this issue Mar 15, 2024 · 3 comments
Closed

Comments

@W1ldPo1nter
Copy link
Contributor

In version 3.1.0, this hardcoded URL name was added to the detail_info.html template. However, the actual URL name is generated like this, which means that if one replaces the image model (with a name other than Image) as described here, the hardcoded URL name in the template no longer matches the actual URL name, leading to reverse errors like this:
image

Django's admin_urlname filter could probably be used in the template to generate the URL name dynamically, but would require that the app label part of the URL name is also dynamic (and not hardcoded to "filer").

@W1ldPo1nter W1ldPo1nter changed the title detail_info.html is incompatible with custom Image models detail_info.html template is incompatible with custom Image models Mar 15, 2024
@fsbraun
Copy link
Sponsor Member

fsbraun commented Mar 15, 2024

@W1ldPo1nter
What would you think about supplying the expand view url in the context? Would you be interested in creating a PR to fix this?
Excellent bug description, btw! Thank you!

@W1ldPo1nter
Copy link
Contributor Author

What would you think about supplying the expand view url in the context?

Sure, that would be another way to solve it.

Would you be interested in creating a PR to fix this?

I guess I can take a swing at it. I'll try to make some time, can't currently say when I'll get to it though.

@fsbraun
Copy link
Sponsor Member

fsbraun commented May 19, 2024

Completed with #1454 and #1471

@fsbraun fsbraun closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants