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

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