Re: Saving image

2007-12-19 Thread Marty Alchin
On Dec 19, 2007 11:28 AM, Jiri Barton <[EMAIL PROTECTED]> wrote: > My question is still the same though; is this the right way to work > with ImageField (FileField)? I still feel this is awkward. One has to > call methods on the model instead methods on the field to update it. Currently, that is

Re: Saving image

2007-12-19 Thread Jiri Barton
Thanks for the quick reply. I have had request.FILES in there; my problem was I misspelled the field name in the template. My question is still the same though; is this the right way to work with ImageField (FileField)? I still feel this is awkward. One has to call methods on the model instead

Re: Saving image

2007-12-19 Thread Marty Alchin
I'm guessing the problem is in one of the "..." portions of your view. In particular, I'd be interested to see how you're instantiating your form. If you're using "Information(request.POST)", that's your problem. Try using "Information(request.POST, request.FILES)" instead, and see if that helps.

Saving image

2007-12-19 Thread Jiri Barton
I used to store images in the database. Now I want to store them on a disk. I have the following model: class User(models.Model): image = modes.ImageField(upload_to='userimages') ... then, I have a new form like class Information(forms.Form): image =

Re: Django admin saving image file - 500 error

2007-06-26 Thread john-f
Thanks again guys - you guys are awesome! On Jun 26, 1:49 pm, Christian Markwart Hoeppner <[EMAIL PROTECTED]> wrote: > > Apparently the mysite.fcgi file was not being automatically created > > when I used the fcgi startup script to start the site. So I went into > > the directory and did a

Re: Django admin saving image file - 500 error

2007-06-26 Thread Christian Markwart Hoeppner
> Apparently the mysite.fcgi file was not being automatically created > when I used the fcgi startup script to start the site. So I went into > the directory and did a `touch mysite.fcgi` then a good old chown > lighttd:lightd mysite.fcgi and it a magical thing happened - it > started working.

Re: Django admin saving image file - 500 error

2007-06-26 Thread akonsu
hello, i remember i got this error when i tried to save a file because my database's auto field sequences were not set up correctly. i am using postgresql and i use fixtures to populate the database. so there were a bug in fixtures that did not set sequences in postgresql correctly (i think it

Re: Django admin saving image file - 500 error

2007-06-26 Thread john-f
Hey Just and update: Apparently the mysite.fcgi file was not being automatically created when I used the fcgi startup script to start the site. So I went into the directory and did a `touch mysite.fcgi` then a good old chown lighttd:lightd mysite.fcgi and it a magical thing happened - it

Re: Django admin saving image file - 500 error

2007-06-26 Thread john-f
HI Thanks for the reply - I really appreciate it. The problem however still occurs: Here's whats happening: 1. user "apache" is added to group "lighttpd" 2. when I chmod 777 it seems to work 3. when I change the file permissions back and save using the django admin the 500 errror occurs. but i

Re: Django admin saving image file - 500 error

2007-06-26 Thread Christian Markwart Hoeppner
El mar, 26-06-2007 a las 08:14 -0700, john-f escribió: > Hi all, > > I'm getting 500 errors when trying to upload a image file with the > django admin. > I think this has to do with user/group permissions on the media > directory (currently they are owned by lighttpd:lighttd) > Does anyone know