django-cms / django-filer

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

fix: File expand url incorrect and worked not with custom image models #1471

Closed fsbraun closed 6 months ago

fsbraun commented 6 months ago

Description

Fixes #1470:

fa385bd2b4b3022f54499bbb3c603d463f4baf2e removed the _view suffix from url name leading to an empty link.

Also, if the Image model is replaced by a custom model, the reverse name changes, too.

This PR moves the generation of the admin urls to the BaseImage model where the other admin urls are generated, sucha as get_admin_change_url etc.

Related resources

Checklist

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.03%. Comparing base (0402d66) to head (4ca60a5). Report is 7 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1471 +/- ## ========================================== - Coverage 77.05% 77.03% -0.03% ========================================== Files 75 75 Lines 3544 3549 +5 Branches 508 570 +62 ========================================== + Hits 2731 2734 +3 - Misses 653 654 +1 - Partials 160 161 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fsbraun commented 6 months ago

@marksweb Oh dear, I fixed the typo in tox.ini.