burke-software / django-mass-edit

Make bulk changes in the Django admin interface
152 stars 67 forks source link

FIX: Crashes for models that have change_form_template set #96

Closed danialmalik closed 2 years ago

danialmalik commented 2 years ago

Description

Related Issue: https://github.com/burke-software/django-mass-edit/issues/83

change_form_template is not supported by MassAdmin right now. If any model admin has this value set, the app crashes on the mass edit page.

Since the change form and mass edit for serve two different purposes, it makes sense to separate the variable that can be used to override their templates.

Testing

To reproduce

Expected behavior

Current behavior

danialmalik commented 2 years ago

@PetrDlouhy could you please have a look? Thanks

PetrDlouhy commented 2 years ago

@danialmalik Nice fix. Could you please add the change_form_temlate to the tests and verify, that it fails without your fix? And also, can you please mention the new mass_change_form_template option somewhere in docs?

I will try to make the tests running again through Github actions in the meantime.

PetrDlouhy commented 2 years ago

@danialmalik Now I have make the tests working again through GitHub actions. Could you please add the test for your case and rebase to current master?

danialmalik commented 2 years ago

@PetrDlouhy please have a look now

codecov-commenter commented 2 years ago

Codecov Report

Merging #96 (ca0bf0c) into master (6cd50a9) will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
+ Coverage   88.31%   88.37%   +0.05%     
==========================================
  Files           6        6              
  Lines         214      215       +1     
==========================================
+ Hits          189      190       +1     
  Misses         25       25              
Impacted Files Coverage Δ
massadmin/massadmin.py 86.63% <100.00%> (+0.07%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6cd50a9...ca0bf0c. Read the comment docs.

PetrDlouhy commented 2 years ago

@danialmalik Very nice. Thank you very much.