Reverted [7986].
commit77fea85c7e1eb62fabf27ab5f69d96f4c876af5d
authormtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Sat, 19 Jul 2008 22:26:32 +0000 (19 22:26 +0000)
committermtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Sat, 19 Jul 2008 22:26:32 +0000 (19 22:26 +0000)
treebeacb954c02bdadbdeec013894ff5e787e971479
parentb8844fe730b1bbba1a393da55a7767c7fa898db1
Reverted [7986].

It turns out that we need to treat filename creation/display (in
particular, the upload_to path) differently depending upon whether the value is
out of the database or provided by other code and there's no reliable way to
determine that at the moment (although some later proposed changes might alter
that). So calling get_FIELD_filename on an unsaved model with a changed file
attribute will not necessarily return the same result as after the save().

Refs #5619. Fixed #7843.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
django/db/models/base.py
tests/modeltests/model_forms/models.py