Re: uploading to a separate directory

2007-09-18 Thread Ian Lawrence
ola, am i glad that people like you exist!!...you explained things just fine and your code works like a charm regards Ian On 9/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > You can not do what you are trying to do, the way you are doing it ;-) > > The problem is the 'test_name' does not

Re: uploading to a separate directory

2007-09-17 Thread [EMAIL PROTECTED]
You can not do what you are trying to do, the way you are doing it ;-) The problem is the 'test_name' does not refer to the data on the instance. It just evaluates to the local variable. That means you are constructing that upload_to string at import time. It is the equivalent of doing: foo = mo

uploading to a separate directory

2007-09-17 Thread Ian Lawrence
Hi, I would like each uploaded test to go into a separate directory in my media_root. In models.py I have: class TestDetail(models.Model): test_grouping = models.ForeignKey(TestGrouping) test_name = models.CharField(maxlength=200) python_file = models.FileField("Python File", upload_t