On Fri, Nov 23, 2012 at 7:25 PM, Victor Rocha wrote:
> For starters, I see more than one thing wrong with your code. I hope thats
> not the one your actually using and it was just a typo when you asked the
> question.
> + jform = editJobForm(request.POST, instance=job) # job has not being
> define
This would be the code I would like you to try:
def editjob(request):
clientjob = ClientEditJob.objects.get(job_id =query)
#adjust query as needed
job = EditJob.objects.get(job_id=query)#adjust query as
needed
if request.method == "POST":
For starters, I see more than one thing wrong with your code. I hope thats
not the one your actually using and it was just a typo when you asked the
question.
+ jform = editJobForm(request.POST, instance=job) # job has not
being defined.
Also when you instantiate your form, you want to use and i
On Thu, Nov 22, 2012 at 5:32 PM, Sergiy Khohlov wrote:
> you can set values in form via form __init__
>
Values of some other instance? How?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google
you can set values in form via form __init__
2012/11/22 Sandeep kaur :
> On Thu, Nov 22, 2012 at 4:54 PM, Sergiy Khohlov wrote:
>> Have you tried to change instances to your new tables ?
>>
> If I try instance of new table, I won't get the old values that I need to
> edit.
>
> --
> Sandee
On Thu, Nov 22, 2012 at 4:54 PM, Sergiy Khohlov wrote:
> Have you tried to change instances to your new tables ?
>
If I try instance of new table, I won't get the old values that I need to edit.
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this
Have you tried to change instances to your new tables ?
2012/11/22 Sandeep kaur :
> I edit value of a table using model instance, however after editing I
> want the values to be saved in some other table with same structure.
> For this to happen I have used following code in views.py :
>
> def edi
I edit value of a table using model instance, however after editing I
want the values to be saved in some other table with same structure.
For this to happen I have used following code in views.py :
def editjob(request):
clientjob = ClientJob.objects.get(job_id = query)
8 matches
Mail list logo