djangomax escribió:
> According to the Django Book for version 1.0, the following should
> work:
> 
> fileField = forms.FileField(upload_to='foo')
> 
> However, I get an error saying there was an unexpected argument. Any
> idea why?
> I'm new to Django and may be doing something outright stupid.
> 
> thx,
> djangomax
> 

upload_to should be a global function:

def get_upload_path(instance, filename):
    return 'foo'

class ....
  file = models.FileField(upload_to=get_upload_path)


Regards.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to