On Fri, 2009-01-23 at 21:48 -0800, dj wrote: > It would appear there is method called get_internal_type() that maybe > what I am looking for. > The method is in django.db.models.Field. But I am unable to find > anything that would tell > me how to use the function to return the data type for a field in a > model.
It's documented in the source. The source is Python, so reading it isn't that hard. Be aware, though, that get_internal_type returns something that is appropriate for determining the type of database column to use. *Not* the Python type that is used for the attribute. That latter value isn't returned by anything. It isn't even a well-defined concept (a field could potentially store and return multiple types, since they're arbitrary Python objects at the most general level). Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---