Hey,

I want to get the Fieldmodel(Charfield, TextField, SlugField...) of  
each member of any given object.

What I have now is this:

     def search_objects_attributes(o):
         object_dir = dir(o)
         for i in object_dir:
             try:
                 current_attribute = getattr(o, i)
             except:
                 continue
             if type(current_attribute) == type(u''):
                 print i+': '+str(current_attribute.__class__)+' '+str 
(len(current_attribute))+' '+current_attribute.encode('utf-8')[:300]


This code get every member, that is represented as unicode string,  
but I'd like to know, if it was defined as TextField, CharField....

How this is possible?

Thanks, Manuel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to