I would add here, that you may ask in a polite way, how number theory relates to the position at hand, here Django. This way, the interviewer has to open up specifically. There might be something, that could be important and interesting or simply a bluff.
"lol I was told you were the Django expert? According to your resume? Are you not supposed to know that?"
Still it does tell you that you have to work with this massive asshole, so it's a worthwhile approach to get more info about the workplace you'll be in.
or about the bullet you just dodged...
if someone connected django with number theory in their head and assumed everyone else can see the connection just as spontaneously, i'd much rather leave than try to handle that arse.
Asking the "what role does number theory play" question is a way to send a message and lose your chance at the job, but so does "optimus prime."
I was not expected to know how to calculate the static load on bridge segments like my engineer friends, but I was expended to learn the basic motion equations and be able to apply them. Equally, I did not take organic chemistry, though I had the option. I can balance an equation but not tell you what an "amine" or an "aldehyde" is.
My college's opinion, and one that meshed really well with my personal opinions on learning, was that you are better off having some surface level understanding so when you are asked to implement some sort of very complex algorithm about a domain specific problem, you will be better equipped to understand the domain expert and understand the common pitfalls that you should avoid.
My friend was a math major (and other majors) so he took number theory. I didn't totally understand all the things we talked about, but thanks to my understanding gathered from other higher level math classes like calculus and discrete math, he could dumb down his information a little less, and I could follow things like how it was funny when he was able to "prove" something on a test by doing every possibility, since there were only 24 possible outcomes, and why that displeased his professor.
If they go all optimus prime that would be a red flag. If they show curiosity a green one.
"It was my understanding that you looking for someone who will help you with Django tooling. I can do that. Although number theory sounds interesting, I never felt the need of diving into it in order to solve any Django-related issue. I would be happy to learn more about how you think number theory relates to Django tooling should I start working here."
When people try to be important like that, it is paramount to take them at face value. In a lot of geek environments this happens all the time. People trying to push that one niche topic they really know about, because this is their comfort zone. The problem is: that one niche topic will rarely be a natural fit for any given conversation. More often than not just asking how they think this relates to the conversation at hand is enough to tame them a little bit.
Many times the stuff people say will contradict with the stated (or implicit) goals of a conversation. in this case the chosen topic was one with which the interviewer felt at home.
So another approach would have been to make it even more about them by e.g. instead of answering their question showing that you did your research: "Ah number theory! I saw you majored in number theory, I admittedly never had the need to dive too much into it — what role does number theory play in $Companyname?"