tickets: 326
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
326 | 2005-08-15 15:42:40 | 2011-11-17 16:06:56 | 2022-03-06 03:20:24.935250 | Accepted | closed | Database layer (models, ORM) | enhancement | normal | 1.0 | wontfix | IPAddressField in decimal format | == An IP address is stored in string format and allocating 15 bytes (120 bits) == But it would be possible convert that address to decimal format and store it in less bits. {{{ >>> import socket, struct >>> ip = "192.168.2.1" >>> q = ip.split(".") >>> n = reduce(lambda a,b: long(a)*256 + long(b), q) >>> n 3232236033L >>> socket.inet_ntoa(struct.pack('!I', n)) '192.168.2.1' }}} [http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/d4d9d1870a481568/] [http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/b2e259d7d55a6071/] | adrian | Bless | 0 | 0 | 0 | 0 | 0 | 0 |