django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

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

Closed W1ldPo1nter closed 1 month ago

W1ldPo1nter commented 3 months ago

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").

fsbraun commented 3 months ago

@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 commented 3 months ago

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 commented 1 month ago

Completed with #1454 and #1471