Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,298 members, 7,815,534 topics. Date: Thursday, 02 May 2024 at 02:07 PM

Help With Django Form - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Help With Django Form (836 Views)

I Need Help With Django / Built A To-do-list Web App With Django And Bootstrap. / Learn How To Build A Realtime Chat Application With Django, Rabbitmq And Vue.js (2) (3) (4)

(1) (Reply)

Help With Django Form by dauddy97(m): 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
dauddy97:
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
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.

1 Like

Re: Help With Django Form by Samcent: 8:16pm On Mar 16, 2019
dauddy97:
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

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.

1 Like

(1) (Reply)

5 Easy Tips To Increase Contact Form Conversion Rates / Wordpress Question / How To Send Call Me Back Sms ?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.