javascript – Is it practical to learn Django and python for web development based on the job market?

My goal here is to stick to a language so that I can master it. One the one hand I know a little python and will explore ml, ai and ds but I might not make it a career. On the other hand the job market for Javascript is superior especially for web dev, mastering js would yield significant monetary benefits if go into web development. So is learning python for web dev not as bad or is javascipt and its frameworks a must for web dev.

I know people advice to learn as much as possible and I will, but mastering any language or framework is a matter of months maybe an year. So I’d like to be certain of what to learn and practice with regular consistency.