diff options
| author | Rohit <130643902+rohit10jr@users.noreply.github.com> | 2025-08-11 09:09:16 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-08-11 10:14:43 +0200 |
| commit | 1d9f6c3270649a4b103df9bfd18733a750341a4e (patch) | |
| tree | 9f15e129aa6f6fbe3e5529c1bf5f95b8db54400d /docs/topics/files.txt | |
| parent | ad836aa0c5a2a9f216a7cc422560f0852d482dde (diff) | |
[5.2.x] Corrected code examples in topics docs.
Backport of fa804d0d14ef4547b4fe2a88ab5d89d4eed5bacd from main.
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() |
