What does “/”: [1231 / 123] mean in the list?

What does “/”: [1231 / 123] mean in the list?

In what context? Please share more information.

First, what you’ve copied here isn’t valid syntax - there’s still something (possibly) missing or mis-copied. If you’re working from some source (book or web site) you might want to go back to the original and verify that you’ve copied it correctly.

But, trying to get at what I think the root question is, is that the “/” is intended to be part of the literal for concatenating BASE_DIR with ‘/static’ to create a path referencing the directory where your static files are stored.

Thanks !! Yes, it is

It is valid syntax! And it’s not meant to be part of the literal. It’s from Django 3.1’s move to pathlib in the settings file. The / concatenates a string to a pathlib.Path.

See my post on the move, which also has a few extra references on learning pathlib: https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/

1 Like

Yes, you’re right (of course), I had forgotten about pathlib. So that line is valid iff BASE_DIR is an object of type pathlib.PosixPath.

Thanks!
Ken

Thanks !! Yes, it is

Thanks !! You are right