I'm wondering how to do this:
instance = SomeModelWithFile.objects.create(
file = some_file,
spam="Spam",
foo="Foo"
)
How can I manually pass in a file like this? In file=some_file should
some_file be a FileUpload instance? How do I create one of those?
--
You received this mes
Anyone?
On Sep 15, 1:18 pm, Yo-Yo Ma wrote:
> I'm wondering how to do this:
>
> instance = SomeModelWithFile.objects.create(
> file = some_file,
> spam="Spam",
> foo="Foo"
> )
>
> How can I manually pass in a file like this? In file=some_file should
> some_file be a FileUpload ins
Have you looked at this yet?
http://docs.djangoproject.com/en/dev/topics/files/#the-file-object
n
On Wed, Sep 15, 2010 at 7:18 PM, Yo-Yo Ma wrote:
> I'm wondering how to do this:
>
>
> instance = SomeModelWithFile.objects.create(
>file = some_file,
>spam="Spam",
>foo="Foo"
> )
>
3 matches
Mail list logo