-
Notifications
You must be signed in to change notification settings - Fork 8
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
✨ [#108] Admin action to check Abonnement callback status #186
✨ [#108] Admin action to check Abonnement callback status #186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, works for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for me, but I'm afraid that if there are a lot of subscribers the admin page would be loading for a while
Perhaps we should only show it in the detail view?
What do you think?
@annashamray hmm that's right, though if it's on the detail view, it isn't really convenient if you want to check multiple subscriptions, because you'd have to open every detail page. Maybe there should be a button/action to trigger it? Also come to think of it, I'm not sure if the |
2238c16
to
223bfde
Compare
@annashamray I've changed it to a custom admin action with a shortcut button to trigger it for all Subscriptions. I've also added a filter on the result to make it easier to check which status checks failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this too works for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and neat! I have very minor comments, which are not critical, so approved
self._request = request | ||
return super().changelist_view(request, extra_context=extra_context) | ||
|
||
def check_all_callback_urls(self, request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh I think having both action and button is a little excessive. When you select objects for the action you can select everything (even if the number of objects is more than 100), which defeats the purpose of the button in my eyes
But it's up to you, so treat this comment as optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the button to make it a bit more visible and easy for admins, since Alex mentioned that the existence of these kinds of actions is not always clear right away: #108 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation!
|
||
Any subsequent executions of this action will remove the previous results from the session | ||
""" | ||
validator = CallbackURLValidator("callback_url", "auth") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice reusage of the existing validator
with a custom button to run this action for all Abonnementen
223bfde
to
484897f
Compare
fixes #108
Changes: