Is there a way to tell django to use a specific function when
selecting data from a model?

The sql is relatively simple, but I don't know how to convert that to
model syntax.

Here's the issue:  a table I'm working with stores ip addresses as a
10 digit integer.  To get the ip address out of that, the sql is
simply SELECT inet_ntoa(ip_field) FROM tbl;

I'm assuming there's some way to tell django to do that cast in the
model:

class tbl(models.Model)
    ip_field = models.IntegerField(  what do i do here? )

Anyone have an idea?

Thanks!
-sned

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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