(help) Can't refer to model.objects from inside the code

I have some models in models.py and I have no problem working with them in the shell. As I call Topic.objects.all(), for example, I get a list with every instance of Topic. But for some reason, as I’m working from the code, the .objects method (is it a method?) doesn’t work.

I’m working from PyCharm, and I get the following notification: "Unresolved attribute reference ‘objects’ for class ‘Topic’ "

Can somebody help me? Maybe I’m missing something obvious?

I’m guessing the problem is maybe in the inheritance from Models.model, because even from inside the Topic class I cannot call .objects

This is the code: https://drive.google.com/file/d/1oHP3Xoz_8tKH3B4UKw4edfpOaEJ3jnti/view?usp=sharing

Somehow Pycharm can’t follow the connection. But your code will probably work. it’s just the ide

1 Like

Thank’s for your help. I thought it may be so, but the data is also not getting to the template.

Nope. You were right. Syntax error on the template. I dismissed it to early and spent too much time proof checking other codes. sigh