Saturday, January 28, 2017

Re: file fields

The error should give some information on what is going wrong and how to fix it

2017-01-27 23:25 GMT+01:00 ايهاب توفيق <e.bugaighis@gmail.com>:
>
> Thank you for your reply and I try the fixed model but the problem with the
> view that I use to store the files from templets to the db I followed the
> django documents as
>
> def custmoer(request):
> if request.method == 'POST':
> form = CustomerForm(request.POST, request.FILES)
> if form.is_valid():
> form.save()
> return HttpResponseRedirect('/login/custmoer/')
> else:
> return HttpResponseRedirect('/login')
> else:
> form= CustomerForm()
> return render(request, "custmoer.html", {'form':form})
>
> this will work if it one file filed but for more than one will give erro I
> don't know how to fix this
>
> بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق:
>>
>> I am new in django and to know how to use multiple file field in the same
>> model can any one help me
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9edfcc46-e3e6-4ce7-a7ff-8ca12ed16ec8%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEuG%2BTbDev8HwxZpPPBawV%3Dsw4FoMNMBbvNAF9GDSAcB5FHoWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment