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
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.
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
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
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
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
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
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
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
9 matches
Mail list logo