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
Refactor redirects edit view to CBV #11860
Refactor redirects edit view to CBV #11860
Conversation
Manage this branch in SquashTest this branch here: https://rohitsrmarefactor-redirects-ed-k370b.squash.io |
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! This is a good start, but there are a few things missing and some that could be improved. Some of them are things we've discussed before, so I highly suggest re-reviewing your previous PRs to avoid the same mistakes – which can help us move faster 😄
Thanks @laymonage, I've made the changes. And, I'm really sorry for making the same mistakes again. I'll make sure not to do them again in the future. |
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.
One small thing remaining (enabling breadcrumbs), but otherwise this looks good to me! I'll add the breadcrumbs myself and merge. Thanks, and sorry if my previous comment was a bit harsh!
delete_url_name = "wagtailredirects:delete" | ||
pk_url_kwarg = "redirect_id" | ||
permission_policy = permission_policy | ||
error_message = gettext_lazy("The redirect could not be saved due to errors.") |
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.
We can now show the breadcrumbs
error_message = gettext_lazy("The redirect could not be saved due to errors.") | |
error_message = gettext_lazy("The redirect could not be saved due to errors.") | |
header_icon = "redirect" | |
_show_breadcrumbs = True |
cfcc99f
to
4302bed
Compare
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.
In this PR I've converted redirects edit view from FBV to CBV as a part of #8365 .