Description

A validation error is raised whenever attempting to save from within the Django Admin interface. I found ticket #2923 and the issue seemed similar so I ran some tests on the code in django/db/models/fields/init.py. In the function "isWithinMediaRoot" "field_data" has a forward slash appended to the start of the path. On Windows "os.path.join" only returns the path after that leading forward slash resulting in an incorrect absolute path and a ValidationError. If you strip out the leading forward slash the absolute path is correctly determined.

In the function "isWithinMediaRoot" "field_data" has a forward slash appended to the start of the path.

The example Model you gave does not meet this condition (no forward slash at the begining)

Anyway, documentation says (crearly enough I think) that the upload_to field is under settings.MEDIA_ROOT, which means that it has to be *relative* to settings.MEDIA_ROOT, hence *not* starting with "/".