Help With Django Form - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Help With Django Form (901 Views)
1 Reply
| Help With Django Form by dauddy97(op): 10:56am On Mar 14, 2019 |
Good day all. I have been learning Django over the weeks now. I found everything simple and easy, the problems I am have are: 1. How to collect Data from the users and same them into the sqlite.db Eg (how we register on nairaland) 2. How Users can modify /edit their Datas 3. How to Delete the users can delete their datas. Kindly shed more lights on these for me. (Like deleting account from nairaland) Thanks so much |
| Re: Help With Django Form by stanliwise(m): 1:56pm On Mar 14, 2019*. Modified: 9:26pm On Mar 17, 2019 |
dauddy97:Go learn CRUD(Creating, Reading, Updating and Deleting) it involves learning query languages. For django it have the user class , search how to use it. |
| Re: Help With Django Form by Samcent: 8:16pm On Mar 16, 2019 |
dauddy97:To your first question, if what you want is user authentication, I will suggest you use a third party app, like django-registration-redux. You can customize the app by writing your own User object and inherit the base class of the app's user object. To the second question, in your view.py file, when requests.method is not post,get the instance of the user object and serve it using your initial django form. If requests.method == 'post', validate the form and save. Third, get the instance of the user object or profile of user, and pass the delete() function. I hope the above will be of some help. I recommend you read Tango with Django, this book will answer your questions better. |
My Latest Blog Built With Django And Sveltekit • Remita Api Integration With Django • I Need Help With Django • 2 • 3 • 4
Simple Websocket Example With Nodejs • An App Developer Interested In Co-founding A Startup • What You Need To Need To Be A Front End Web Developer