1

I wanted to know the difference between using MEDIA_ROOT = BASE_DIR / 'media' and MEDIA_ROOT= os.path.join(BASE_DIR, "media") in settings.py.

nz_19
  • 61
  • 5

2 Answers2

0

Those are basically the same, but only if BASE_DIR is a pathlib.Path object.

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114
0
MEDIA_ROOT = BASE_DIR / 'media'

utilizes pathlib library

MEDIA_ROOT = os.path.join(BASE_DIR, "media")

utilizes os library

The default library depends on which version of Django you employ.

What do you mean by deleting and uploading can you give more detail?

tealy
  • 132
  • 1
  • 12