Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@button(disable_on_click=True) is not working #6

Open
gleniat opened this issue Sep 7, 2022 · 1 comment
Open

@button(disable_on_click=True) is not working #6

gleniat opened this issue Sep 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@gleniat
Copy link

gleniat commented Sep 7, 2022

disable_on_click does not work for me at all.

class MyModelModelAdmin(ExtraButtonsMixin, admin.ModelAdmin):
    @button(disable_on_click=True)
    def send_newsletter_now(self, request):
        time.sleep(10)
        self.message_user(request, 'The newsletter emails were sent successfully.')

The button is still clickable after first click (while loading the page).

@MatthijsvW
Copy link

I'm experiencing the same problem. Using Django 4.1.1 on Python 3.9.10

@saxix saxix added the bug Something isn't working label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants