I have a Python class with different attributes but I do not seem to find how to get the type of each of them. I want to check whether if a given attribute has an specific type.
Be aware that I am talking about the class and not an instance.
Let's say that I have this class:
class SvnProject(models.Model):
'''
SVN Projects model
'''
shortname = models.CharField(
verbose_name='Repository name',
help_text='An unique ID for the SVN repository.',
max_length=256,
primary_key=True,
error_messages={'unique':'Repository with this name already exists.'},
)
How can I check whether shortname is a model.CharField or a model.Whatever?