getting related data from database other than default

2019-02-18 Thread progmgppers
Hi, I'm having some trouble getting data from a database with foreign-keys. Normally a query-set retrieved like this, obj = model.objects.all().filter(id=pk).select_related(), would give me the table row data, and the related row data from another table defined in the model, of the default

Re: Need some help with updating a database record from forms cleaned data

2018-12-15 Thread progmgppers
While I'm waiting on a response, I will try an update view. On Saturday, December 15, 2018 at 10:58:36 PM UTC-5, progm...@gmail.com wrote: > > Hi I am trying to update a record. Form.save() worked but it created a new > record and I have yet to figure out how to update a database record in >

Need some help with updating a database record from forms cleaned data

2018-12-15 Thread progmgppers
Hi I am trying to update a record. Form.save() worked but it created a new record and I have yet to figure out how to update a database record in views.py. Below are the 2 views related to what I'm doing. On one page I list customers to be chosen for update. When a customer is chosen, the pk

Need help with db save.

2018-12-12 Thread progmgppers
Hi, I'm trying to save a new user and their profile information in same form and view. It is almost working, but cant get by this error. [image: errmsg.png] I know I have values available because I print them just before saving from my views.py, which is: def addUser(request):

Re: Help with data bound ModelChoiceField

2018-12-11 Thread progmgppers
TY madjardi for all your input! I continued to search and found what I wanted. But I still need to understand how it all works. I know it is an initiation function on the form but not sure how variables are transported around to give me the results. But I think I can dig further to find out.

Re: Help with data bound ModelChoiceField

2018-12-11 Thread progmgppers
Thank you for your suggestion: Here is my model, as you will see, I commented out my def and added yours. Unfortunately there was no change. # Customer Information Database class dbCustomer(models.Model): name =models.CharField(max_length=60) contactfn =models.CharField(max_length=25) contactln