Ok, I admit that I saw the cd and stopped thinking straight - apologies.

I don't know why you are getting the problem you are getting, but I would
suggest that you should delete one indentation one the render_to_response
line, so that it catches *everything* that falls through the cracks.

Also, we will probably need to see the view
'Automation.report.views.result_chem'
since this view seems to be fine - and it's after a save that the issues
start, correct?

cheers
L.



On Fri, Nov 2, 2012 at 5:32 PM, Satinderpal Singh <
satinder.goray...@gmail.com> wrote:

>
>
>
> On Fri, Nov 2, 2012 at 1:41 AM, Lachlan Musicman <data...@gmail.com>wrote:
>
>> On Thu, Nov 1, 2012 at 6:32 PM, Satinderpal Singh <
>> satinder.goray...@gmail.com> wrote:
>>
>>> On Thu, Nov 1, 2012 at 1:25 AM, Lachlan Musicman <data...@gmail.com>wrote:
>>>
>>>> On Thu, Nov 1, 2012 at 7:30 AM, Satinderpal Singh
>>>> <satinder.goray...@gmail.com> wrote:
>>>> > I use formset in my views.py file for the forms. It saves the entries
>>>> from
>>>> > the form to the database but the problem is that it shows all the
>>>> previous
>>>> > forms along with the new form for the new entry. The code for my
>>>> views file
>>>> > is given below:
>>>> >
>>>> > def chemical_analysis(request):
>>>> > ChemicalFormSet = modelformset_factory(chem_analysis)
>>>> > if request.method=='POST':
>>>> >                 formset = ChemicalFormSet(request.POST, request.FILES)
>>>> >                 if formset.is_valid():
>>>> > cd = formset.cleaned_data
>>>> > formset.save()
>>>>
>>>> Should that be cd.save()? Where else is cd used?
>>>
>>> No other cd is used in this view, and i did not get your above logic,
>>> cd.save()
>>>
>>>>
>>>>
>> I think you are saying you don't understand my response? I'm asking if
>> the problem is fixed by replacing formset.save() - with cd.save(), since
>> you have cd = formset.cleaned_data but no other instances of cd, making it
>> kinda useless?
>>
> I tried this way, but it do not solve the problem.
>
>>
>> should here be a cd = ObjectName() in there?
>>
> If that is the case, how cd can save the data. But the problem is not with
> saving the entries but to clear the previous form entries.
>
> --
> Satinderpal Singh
> http://satindergoraya.blogspot.in/
> http://satindergoraya91.blogspot.in/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
...we look at the present day through a rear-view mirror. This is something
Marshall McLuhan said back in the Sixties, when the world was in the grip
of authentic-seeming future narratives. He said, “We look at the present
through a rear-view mirror. We march backwards into the future.”

http://www.warrenellis.com/?p=14314

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to