Re: Database model fields question

2008-12-02 Thread sned
hon(self, value): return socket.inet_ntoa(struct.pack('!L', value)) class tbl(models.Model) ip_field = ipfield() Note that this only deals with pulling data from the database, I don't need to worry about putting data in. Thanks! -Sned On Dec 1, 11:44 am, Daniel Roseman <[EM

Database model fields question

2008-12-01 Thread sned
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 hav