Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#2616 closed enhancement (wontfix)

Add DB API support for lookup against IP address fields

Reported by: kirk.reeves@… Owned by: nobody
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by jacob)

please add an additional key word for querysets when searching with the inet datatype..

and example would be
assume a table constructed as follows.

create table network_interfaces(
id serial,
ip inet,
interface char(20)

--The SQL Syntax ---
SELECT * from network_interface where ip << '';

--possible Django syntax ---

Thanks. Django is a great project.

Change History (7)

comment:1 Changed 9 years ago by jacob

  • Description modified (diff)

This is a nice idea (I'd think that overloading the "in" lookup type would work best) here, but I'm concerned that there's not a way to do this in a database-agnostic manner. Kirk, do you think you could do a quick survey of databases and see if it's going to be possible to do this generically?

comment:2 Changed 9 years ago by adrian

  • Summary changed from additional database api to Add DB API support for lookup against IP address fields

comment:3 Changed 9 years ago by mir@…

  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 8 years ago by jacob

  • Keywords qs-rf added

comment:5 Changed 8 years ago by mtredinnick

  • Keywords qs-rf removed

Not a feature worth holding up queryset-refactor for. It can be done after the merge back into trunk. Removing the keyword.

comment:6 Changed 5 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed

This is solved by adding the ability for custom (per-field) lookup types to the ORM syntax. Adding specific new lookup types is going to generally deferred until somebody implements that.

comment:7 Changed 5 years ago by carljm

Ticket for allowing custom lookup types is #14263.

Note: See TracTickets for help on using tickets.
Back to Top