-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Client deletion implement #389
Conversation
@TreyWW messages.error(request, 'Client not found')
return render(request, "pages/clients/dashboard/_table.html", {"delete": True}) If returning a 404 status is essential I can further investigate that issue. Let me know. As it comes to |
Yeah this is a big issue throughout the project. We, like you say, have two solutions.
I'm completely happy with option 1 for now though, feel free to just return a message and let the row delete, since the client is "non existent" anyways. It's just I find errors like this mean I've messed up (developer), that a bug caused it (generally at least). So yeah, fine by me. |
I understand. I will implement and push 1st solution for the time been and in some spare time I will try to work on the 2nd solution but it might take a while since I don't have experience with JS. |
Update: For option 2 with deleting content, I just checked the HTMX docs and we can actually send off a HX-Reswap and HX-Retarget to send off the notifications still! It would need some django work, but no JS! Woo! I can provide more details later, just about to head home. |
@Domejko sorry about the delay. Could you run |
@TreyWW no problem. Linting and formatting have been fixed now. What about that |
Great PR, thanks @Domejko! :) |
Description
Regarding #386
TODO:
{% component "messages_list" %}
at the end of _rows.html then message about successful creation of client gets 'bugged' and it just blinks for split of second. I don't know much about HTML so I'm learning on the fly.Checklist
djLint-er on any new code
(checks
will
fail without)
changes
What type of PR is this?
Added/updated tests?
Related PRs, Issues etc