Skip to content
Advertisement

Django – CRUD functionality, Edit Profile Details

I am new to Django but I am creating a Realtor application, I would like the user to be able to update their details using CRUD functionality in the UI.

But I can’t get my request to work:

Heres is my code (views.py):

JavaScript

Then here is (urls.py)

JavaScript

]

Lastly, here is my code snippet from the requested link in the html file:

JavaScript

Please, any help would be really appreciated, also Have i included all my files correctly?

Thank you so much

Advertisement

Answer

To answer your latest question, you have to create a new view:

JavaScript

Although its not related to your question, I may suggest you use form built-in library from Django. Likewise

JavaScript

create a new file, forms.py, create a new form:

JavaScript

in the html template:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement