Re: Can't post attachment file in django test

2007-10-28 Thread Karen Tracey
My question on the file object was a shot in the dark based on the only thing that looked odd to me, given that the traceback information was useless. So, if that seems to be correct per the docs, then I think you'll need to get the traceback from the actual error in order to make progress. >From

Re: Can't post attachment file in django test

2007-10-28 Thread Igor Kovalenko
> Is the value assigned to 'galleryfilename' really supposed to be an open > file object? Just based on the name it sounds more like it should be a > string containing the file name. Ok. Let's be clear. I have a form with 3 inputs: input type="text" name="name" textarea name="annotation" input t

Re: Can't post attachment file in django test

2007-10-27 Thread Karen Tracey
On 10/27/07, Igor Kovalenko <[EMAIL PROTECTED]> wrote: > > > Hello! > > Could somebody tell what I'm doing wrong. I can't post a file in > django test. > My code is the following: > > path = os.getcwd() + '\\fotogallery\\testfotos\\gfoto1.jpg' > gf = open(path) > response = self.client.post('/fotog

Can't post attachment file in django test

2007-10-27 Thread Igor Kovalenko
Hello! Could somebody tell what I'm doing wrong. I can't post a file in django test. My code is the following: path = os.getcwd() + '\\fotogallery\\testfotos\\gfoto1.jpg' gf = open(path) response = self.client.post('/fotogallery/addgallery/', {'name': 'New Gallery 1', 'annotation': 'This is New