To clear your form after submit, just re-assign an empty form object after
the form.save(). See below
def soapprod_form (request, id=0):
if request.method == "GET":
if id == 0:
form = SoapprodForm()
else:
soapprod = Soapprod.objects.get(pk=id)
Hi,
Please also attach the code of your list template where the delete is been
executed.
On Mon, May 25, 2020 at 1:39 AM Ifeanyi Chielo
wrote:
> Hello,
> I performed a CRUD operation and every thing is working well except two
> things
> 1. my insert form does not clear the text boxes after
Hello,
I performed a CRUD operation and every thing is working well except two
things
1. my insert form does not clear the text boxes after saving a record
2. my delete operation renders an error page after deleting a record with a
message ''DoesNotExist at /delete/3/" or "AttributeError at
3 matches
Mail list logo