fix(Issue-27): Confirmations not triggered on models with validation failures (#30)
* feat(ISSUE-27): Added some validation integration tests * feat(ISSUE-27): Integration tests for validations * feat(ISSUE-27): Unable to select autocomplete with selenium * feat(ISSUE-27): Fix file caching with proper FileCache * feat(ISSUE-27): Some minor tweaks * feat(ISSUE-27): Try reviewdog * feat(ISSUE-27): Remove noisy linting * feat(ISSUE-27): Black format * feat(ISSUE-27): Adding some simple file cache tests * feat(ISSUE-27): Some cleaning up Co-authored-by: Thu Trang Pham <thu@joinmodernhealth.com>
This commit is contained in:
@@ -8,6 +8,9 @@ from ..models import Checkout
|
||||
|
||||
|
||||
class CheckoutForm(ModelForm):
|
||||
search_fields = ["shop", "date"]
|
||||
confirm_change = True
|
||||
|
||||
class Meta:
|
||||
model = Checkout
|
||||
fields = [
|
||||
|
||||
@@ -5,6 +5,7 @@ from admin_confirm.admin import AdminConfirmMixin, confirm_action
|
||||
class ShopAdmin(AdminConfirmMixin, ModelAdmin):
|
||||
confirmation_fields = ["name"]
|
||||
actions = ["show_message", "show_message_no_confirmation"]
|
||||
search_fields = ["name"]
|
||||
|
||||
@confirm_action
|
||||
def show_message(modeladmin, request, queryset):
|
||||
|
||||
Reference in New Issue
Block a user