Wiadomość napisana w dniu 2008-11-13, o godz. 01:52, przez Tim: > Just to add some more information - I have been messing around with > making the upload_to a callable, but I still have the same problem in > that I need to build the path based on information that only exists > during runtime (that is, a call to a view). Basically, I don't know > the value of upload_to until I'm in the view. Ideally I'd like to do > the following actions in views.py: > > - import the model > - set the upload_to value > - save the file > > What to do?
It seems to me that the option would be to (temporarily) store the file somewhere using semi-static information you already have, then move it to final location and update the path stored in model's FileField in view code. -- We read Knuth so you don't have to. - Tim Peters Jarek Zgoda, R&D, Redefine [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---