it's in the "type" attribute of the field, as in

db.auth_user.first_name.type



PS: if you're checking other variables, the recommended method to check the 
type in python is is isinstance()
>>> myvar = 123
>>> isinstance(myvar, int)
True







On Saturday, December 29, 2012 10:58:20 AM UTC+1, at wrote:
>
> Ok, I've somehow achieved the objective in this way:
> *dType = type(all_rows[rowid][key])
> intType = type(123)
> strType = type('Test String')
> .
> .
> if (dType == strType): 
>    print "Found an string"
> elif (dType == intType):
>    print "Found an integer"
> else:
>    print "Found something else"
>
> *Regards
>
> On Saturday, 29 December 2012 13:23:39 UTC+5, at wrote:
>>
>> lets say we've:
>> dType = type(all_rows[rowid][key])
>>
>> Now how to check if the dType is string, or integer, boolean etc? Any 
>> build-in functions for this purpose?
>>
>> Regards
>>
>> On Saturday, 29 December 2012 13:07:29 UTC+5, at wrote:
>>>
>>>
>>> While looping through all database fields of a table, need to determine 
>>> data-type of each field before processing data in it. 
>>> How to determine which fields is of type *str*, which one is of *int 
>>> type*, etc. Can somebody assist?
>>>
>>> Thanks
>>>
>>

-- 



Reply via email to