On Jan 24, 12:57 pm, Malcolm Tredinnick
wrote:
> On Fri, 2009-01-23 at 12:15 -0800, Julien Phalip wrote:
> > On Jan 24, 2:45 am, varikin wrote:
> > > The UploadedFile[1] object has a field called content_type. So if you
> > > have this in a form:
>
> > > myfile = request.FILES['some_file']
> > >
On Fri, 2009-01-23 at 12:15 -0800, Julien Phalip wrote:
> On Jan 24, 2:45 am, varikin wrote:
> > The UploadedFile[1] object has a field called content_type. So if you
> > have this in a form:
> >
> > myfile = request.FILES['some_file']
> > if myfile.content_type != 'application/zip':
> > #ra
On Jan 24, 2:45 am, varikin wrote:
> The UploadedFile[1] object has a field called content_type. So if you
> have this in a form:
>
> myfile = request.FILES['some_file']
> if myfile.content_type != 'application/zip':
> #raise error
>
> I don't know if this will help you in your test. I hope
On Jan 23, 1:39 am, Julien Phalip wrote:
> I have a view which processes a multi-part form and whose behaviour
> varies depending on the content types of the uploaded files. I've
> written some tests for that view as follows:
>
> post_data = {
> 'name1': 'blah',
>
Hi,
I have a view which processes a multi-part form and whose behaviour
varies depending on the content types of the uploaded files. I've
written some tests for that view as follows:
post_data = {
'name1': 'blah',
'file_field1': image_data,
}
respo
5 matches
Mail list logo