Re: FileField - Forms - upload to not available

2009-05-25 Thread tom
just to let you know. I am working with an additonal model now. this model simply holds the file itself without any meta data. This file is than used to get some tags out of the mp3 tags and with this information i create than the actual meta data filled Track model. Attached to that is than the f

Re: FileField - Forms - upload to not available

2009-04-02 Thread Lior
I've got the same problem. I'm using signals, so I guess your problem will not be solved with signals. I'm also using pre_save. It seems that the attribute upload_to isn't (yet) set when in pre_save. I still don't know if it's a bug, or a 'new feature', as my code works perfectly on Django 1.0.2.

Re: FileField - Forms - upload to not available

2009-03-25 Thread tom
thanks for the update. So it seems, that save(commit=False) does not work here. What I try to do is: create a track object without saving, because I need two more objects (Artist, Album). These two offers will be created out of the mp3 tags of the file, if there are any. I assign than those two o

Re: FileField - Forms - upload to not available

2009-03-12 Thread lucy
Fixed. It turned out I was reading my error log wrong. It wasn't the image field itself that was having trouble saving, but a pre_save signal that attempted to open the image and create a thumbnail. Yeah, instance.image.path doesn't exist yet. I moved that to a post_save signal and everything work

Re: FileField - Forms - upload to not available

2009-03-12 Thread lucy
I have a similar problem in that upload_to is not being respected, even when saving. That is, the system tries to save the file directly in my MEDIA_ROOT folder, rather than the upload_to path. An error occurs, and the file does not appear to be saved anywhere. It works fine on Mac OS X.4 with sq

Re: FileField - Forms - upload to not available

2009-03-07 Thread tom
Unfortunatly I still haven't found a solution and I tryed it with and without a trailing /. No difference. I will post the solution, if there is one and if I find it. :) -Tom On 5 Mrz., 16:39, Francis wrote: > Did you found any solution? > > Because I have the same problem, but on opposite si

Re: FileField - Forms - upload to not available

2009-03-05 Thread Francis
Did you found any solution? Because I have the same problem, but on opposite side (works on mac but not on linux). I think that you need a trailing "/" to your upload_to path though. Francis On Mar 1, 8:21 pm, tom wrote: > here is some more information, maybe that helps. These are just > dif

Re: FileField - Forms - upload to not available

2009-03-01 Thread tom
here is some more information, maybe that helps. These are just different lines of code from different files, but they actually describe what's happening: settings.py MEDIA_ROOT = '/Library/WebServer/Documents/media/indiebreed/' models.py file = models.FileField(upload_to="tmp/tracks", max_lengt

FileField - Forms - upload to not available

2009-02-27 Thread tom
Hi, I am somehow confused. I am using this in a model: file = models.FileField(upload_to="tmp/tracks/", max_length = 1000) and than I am doing this in a form: new_track = form.save(commit = False) after that I want to access the file to do some stuff with it, like print new_track.file.path whe