Question:I imported a model(named Feature) and set it to a list in Django
print(posts)this displays apple in shell which is the 5th object however on checking it with a if condition it returns false
'apple'is a string object.
postsis not a
Featureobjects. It will never find object of other type 🙂
You have to seek
Featureobjects like that, in example:
PS If name is going to be
uniqueyou can add
unique=Trueto the model.
If you have better answer, please add a comment about this, thank you!