Closed W1ldPo1nter closed 1 month 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!
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.
Completed with #1454 and #1471
In version 3.1.0, this hardcoded URL name was added to the![image](https://github.com/django-cms/django-filer/assets/46226874/87834348-3a9a-4ed3-aaa8-fcf686e69a76)
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 thanImage
) as described here, the hardcoded URL name in the template no longer matches the actual URL name, leading to reverse errors like this: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").