Python and django newbie question, here is code:
class Client(User)
#some fields
client=Client()
client.save()
user=User.objects.all()[0]
#want to ckeck type of user, expect that it is Client:
isinstance(user,Client) #returns false
#but this works:
isinstance(user,User) #returns true
But I expect that user is Client. What's wrong?
Addition: Need to get subclass object first, and it works fine:
if hasattr(user,'client'):
client=user.client
Addition 2: Guys, you so angry so I afraid to post anything more in this question :) It's closed, and I fully understood my absolutely vacuum in knowledge of django, python, polymorphism and other IT technologies, thanks ))