diff options
Diffstat (limited to 'docs/topics/files.txt')
| -rw-r--r-- | docs/topics/files.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/files.txt b/docs/topics/files.txt index 0c4d1e5c6c..bee04e1d75 100644 --- a/docs/topics/files.txt +++ b/docs/topics/files.txt @@ -70,7 +70,7 @@ location (:setting:`MEDIA_ROOT` if you are using the default >>> from django.conf import settings >>> initial_path = car.photo.path >>> car.photo.name = "cars/chevy_ii.jpg" - >>> new_path = settings.MEDIA_ROOT + car.photo.name + >>> new_path = os.path.join(settings.MEDIA_ROOT, car.photo.name) >>> # Move the file on the filesystem >>> os.rename(initial_path, new_path) >>> car.save() |
