Re: 32-bit integers IP address to 4-octet IP address

2011-01-23 Thread aledr
>From the Django docs[1]: "values() takes optional positional arguments, *fields, which specify field names to which the SELECT should be limited. If you specify the fields, each dictionary will contain only the field keys/values for the fields you specify. If you don't specify the fields, each di

Re: 32-bit integers IP address to 4-octet IP address

2011-01-23 Thread phil...@bailey.st
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I aledr, thanks for your reply, I've added the socket.inet_ntoa to my view.py #view.py from django.http import HttpResponse import socket from snort.models import Iphdr def snort(request): ip = Iphdr.objects.values("ip_src") return so

Re: 32-bit integers IP address to 4-octet IP address

2011-01-23 Thread aledr
I guess socket.inet_ntoa is enough for what you need. On Sun, Jan 23, 2011 at 7:06 AM, Phillip Bailey wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Dear All, > > I've started playing around with Django in the last few days, and I'm > enjoying the speed > and the power of such f

32-bit integers IP address to 4-octet IP address

2011-01-23 Thread Phillip Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear All, I've started playing around with Django in the last few days, and I'm enjoying the speed and the power of such framework. I'm writing a small application to display and sort ip addresses stored in a Postgresql database, right now I'm stuck