Thanks for pointing me in the right direction. Here's the solution I
came up with:
import socket, struct
class ipfield(models.Field):
__metaclass__ = models.SubfieldBase
def db_type(self):
return 'integer'
def to_python(self, value):
retu
On Dec 1, 6:48 pm, sned <[EMAIL PROTECTED]> wrote:
> 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 addr
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
3 matches
Mail list logo