Re: Template Engine Compilation and Runtime Refactoring Progress

2011-07-18 Thread Armin Ronacher
Hi, Current status: The freezing of free variables into a context dictionary for includes and extension is currently not working as expected. The reason is obvious but the solution is not entirely clear to me yet. I need to track what variables were assigned to until a specific statement, not on

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
On Mon, Jul 18, 2011 at 4:36 PM, Tom Evans wrote: > On Mon, Jul 18, 2011 at 3:56 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > Hi, > > I have created a ModelField called RealIPAddressField. > > It stores the IP address in integer form, meaning the lookups on large > > tables are much faste

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Tom Evans
On Mon, Jul 18, 2011 at 3:56 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Hi, > I have created a ModelField called RealIPAddressField. > It stores the IP address in integer form, meaning the lookups on large > tables are much faster: > http://djangosnippets.org/snippets/2493/ > @django-develope

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Thansk for your re 2011/7/18 Łukasz Rekucki > On 18 July 2011 16:56, Cal Leeming [Simplicity Media Ltd] > wrote: > > Hi, > > I have created a ModelField called RealIPAddressField. > > It stores the IP address in integer form, meaning the lookups on large > > tables are much faster: > > http://d

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Dmitry Gladkov
I like the idea, but I don't like the approach, it should be a subclass of PositiveIntegerField, as it is an unsigned int on DB level. Also, I agree with Łukasz that it should support both IPv6 and IPv4. -- Best wishes, Dmitry Gladkov, mailto:dmitry.glad...@gmail.com +380 91 303-37-46 On Mon,

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Łukasz Rekucki
On 18 July 2011 16:56, Cal Leeming [Simplicity Media Ltd] wrote: > Hi, > I have created a ModelField called RealIPAddressField. > It stores the IP address in integer form, meaning the lookups on large > tables are much faster: > http://djangosnippets.org/snippets/2493/ > @django-developers - Do yo

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Javier Guerra Giraldez
On Mon, Jul 18, 2011 at 10:13 AM, Javier Guerra Giraldez wrote: > On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd] > wrote: >> It stores the IP address in integer form, meaning the lookups on large >> tables are much faster: > > are they?    hashtables shouldn't be too sensitiv

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Or maybe you were talking about hash tables in MySQL. Either way, you're right that this would probably need some benchmarks before being approved for the core. @django-developers, if I was to provide some benchmarks, would this possibly be considered for the core? Cal On Mon, Jul 18, 2011 at 4

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, I should have been a little more specific. I meant faster lookups in terms of database index, such as MySQL with InnoDB. Cal On Mon, Jul 18, 2011 at 4:13 PM, Javier Guerra Giraldez wrote: > On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd] > wrote: > > It stores the IP

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Javier Guerra Giraldez
On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd] wrote: > It stores the IP address in integer form, meaning the lookups on large > tables are much faster: are they?hashtables shouldn't be too sensitive to key size, as long as the string size stays bounded... like on IP addr

Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Hi, I have created a ModelField called RealIPAddressField. It stores the IP address in integer form, meaning the lookups on large tables are much faster: http://djangosnippets.org/snippets/2493/ @django-developers - Do you think there is any possibility of this getting included into the core?

Re: Decision for ticket #6362 - Remove blank spaces with strip when validating the data

2011-07-18 Thread Tom Evans
On Thu, Jul 14, 2011 at 10:35 PM, Luke Plant wrote: > On 10/07/11 22:26, Chris Beaven wrote: >> To clarify, didn't even notice we were talking about models.Field, I'm >> +0 for a 'strip' attribute on the form's field, nothing on the model. > > Like Chris, I don't think we can put this feature anyw