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 <[email protected]> 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 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 /delete/6/" > example of the error messages are shown below. i also attached view.py, > model.py and template file > > DoesNotExist at /delete/3/ > > Soapprod matching query does not exist. > > *Request Method:* > > POST > > *Request URL:* > > http://localhost:8000/delete/3/ > > *Django Version:* > > 2.1.5 > > *Exception Type:* > > DoesNotExist > > *Exception Value:* > > Soapprod matching query does not exist. > > *Exception Location:* > > C:\Users\IFEANYI > CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\models\query.py > in get, line 399 > > *Python Executable:* > > C:\Users\IFEANYI CHIELO\AppData\Local\Programs\Python\Python37\python.exe > > *Python Version:* > > 3.7.2 > > *Python Path:* > > ['C:\\Users\\IFEANYI CHIELO\\divinecrown', > > 'C:\\Users\\IFEANYI ' > > 'CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip', > > 'C:\\Users\\IFEANYI > CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\DLLs', > > 'C:\\Users\\IFEANYI > CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\lib', > > 'C:\\Users\\IFEANYI CHIELO\\AppData\\Local\\Programs\\Python\\Python37', > > 'C:\\Users\\IFEANYI ' > > 'CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages'] > > *Server time:* > > Mon, 25 May 2020 00:03:25 +0000 > > > or > > > AttributeError at /delete/6/ > > 'str' object has no attribute 'get' > > *Request Method:* > > POST > > *Request URL:* > > http://localhost:8000/delete/6/ > > *Django Version:* > > 2.1.5 > > *Exception Type:* > > AttributeError > > *Exception Value:* > > 'str' object has no attribute 'get' > > *Exception Location:* > > C:\Users\IFEANYI > CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\middleware\clickjacking.py > in process_response, line 26 > > *Python Executable:* > > C:\Users\IFEANYI CHIELO\AppData\Local\Programs\Python\Python37\python.exe > > *Python Version:* > > 3.7.2 > > *Python Path:* > > ['C:\\Users\\IFEANYI CHIELO\\divinecrown', > > 'C:\\Users\\IFEANYI ' > > 'CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip', > > 'C:\\Users\\IFEANYI > CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\DLLs', > > 'C:\\Users\\IFEANYI > CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\lib', > > 'C:\\Users\\IFEANYI CHIELO\\AppData\\Local\\Programs\\Python\\Python37', > > 'C:\\Users\\IFEANYI ' > > 'CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages'] > > *Server time:* > > Mon, 25 May 2020 00:09:23 +0000 > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/b43b280d-ab19-4620-8544-133c897396f0%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/b43b280d-ab19-4620-8544-133c897396f0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHyB84pa3CX7c08v1vsomx5Xvau%2B1NYYx8X-2eSO9j_2vHyikA%40mail.gmail.com.

