Hello,

I am doing a project in djagno and I stucked in working with files. I
am realy confused about, how it is described in django documentation
and I did not find a solution in it that would suit my case. So
basically what I want to do - I want to have a storage for some
certain files in my project separate from my directory for static
files e.g {{ project path}}/static/ directory for static files and
{{ project path }}/files/ for some specail files. How can I do that?

At first I have a file stored at {{ project path }}/files/temp/ and
when a particular model or form object is saved I want to move that
file to {{project path}}/files/stable/ (so it will be no longer in
temp dir) and rename file to "stable". I want to have only a one file
in stable dir, so when I moved there another file the old file will be
overwriten (now if I do it, django will create stable_1 and so on,
when I will try to save file with name that already exists).

I was trying to do it a cleaner way - to override a FileField save
method or override FileStorage class of that field, but I was unable
to find in docs a solution that will fit my speciffiaction precisely
as I want it. Maybe I will have to use os.system, what do you think? I
am kind of a newbie to django so I will appreciate any answer, thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to