I am doing the following:
model._meta.get_field('g').get_internal_type
Which returns the following:
<bound method URLField.get_internal_type of <django.db.models.fields.URLField: g>>
I only want the know that this field is "URLField" . How do I extract that from this output?
Note: I am doing this so that I can do validation on the fields. For example if a url , I want to check if it is well formed.
a.model._meta.get_field('g').get_internal_typea, actually? I've just tried it in Django shell with my models and I do get the output likeOut[7]: u'CharField', and I've called._meta.get_field('g').get_internal_type()on model class directly