Re: modelFormSet and csrf

2015-02-24 Thread joulu tervehdys
Hi,Yes csrf was missing, but got it working by changing render_to_response to render. Surprising that example code was not designed to work as such Still I would like to get action buttons for each row. Admin view has at least some kind of links in each row. -thanks 2015-02-24 12:52 GMT+02:00 aRk

Re: modelFormSet and csrf

2015-02-24 Thread aRkadeFR
Please, print your variable request.POST on your view and see if the csrf_token is missing or not? Same for your formset variable :) On 02/24/2015 09:55 AM, joulumaa wrote: Thanks, but I did exactly that and still 403 csrf error, attached my template and related code thanks for help {% csrf_t

Re: modelFormSet and csrf

2015-02-24 Thread joulumaa
Thanks, but I did exactly that and still 403 csrf error, attached my template and related code thanks for help {% csrf_token %} {{ formset }} def school(request): SchoolFormSet = modelformset_factory(SchoolHistory) if request.method == 'post': formset =

Re: modelFormSet and csrf

2015-02-24 Thread aRkadeFR
Hello :) The template indeed doesn't show the submit button in the documentation here: https://docs.djangoproject.com/en/1.7/topics/forms/formsets/#using-a-formset-in-views-and-templates In order to add the csrf token, you can use the template tag {% csrf %} inside the form tag. And add the subm