Re: saving get objects to models

2013-01-22 Thread Satinderpal Singh
>> material = Material.objects.get(name=request.GET['material']) >> > I think this will help you : > p = table(material =material, ...[other fields of table to be saved]) > p.save() Thanks, this works for me. > Here table is your table where you want object value to be saved. > Hope this helps

Re: saving get objects to models

2013-01-22 Thread Sandeep kaur
On Tue, Jan 22, 2013 at 8:39 PM, Satinderpal Singh wrote: > How to save the objects to models without using form. I tried to save > the name object to the model, but unable to do so, > > material = Material.objects.get(name=request.GET['material']) > I think this will

Re: saving get objects to models

2013-01-22 Thread Satinderpal Singh
Thanks, for this help On Tue, Jan 22, 2013 at 9:34 PM, Bill Freeman wrote: > Forgive me if I am not being direct, but I'm not sure I understand your > question. You understand the problem very well. > For the python statement that you include in your question to work, the >

Re: saving get objects to models

2013-01-22 Thread Bill Freeman
Forgive me if I am not being direct, but I'm not sure I understand your question. For the python statement that you include in your question to work, the following must be true: 1. There must be a query parameter on the url named "material". e.g.;