Opened 9 years ago

Closed 8 years ago

#6532 closed (worksforme)

No matches for unrepresentable float values with list_filter

Reported by: Daniel Pope <dan@…> Owned by: thauber
Component: Core (Cache system) Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When using FloatField as an admin list_filter, float values that cannot be represented with complete fidelity (such as 0.1) are displayed as filter options, but no models appear on the filtered list page.

list_filter should not compare equivalence with floating point numbers, it should test for membership in a range (v-ε, v+ε) for very small ε.

Change History (3)

comment:1 Changed 8 years ago by Honza_Kral

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from SVN to newforms-admin

changed this to newforms-admin branch, that's where admin is living now.

The correct solution for this would probably be to create a FilterSpec to split the values into equidistant intervals and filter using those borders.

comment:2 Changed 8 years ago by thauber

  • Owner changed from nobody to thauber
  • Status changed from new to assigned

comment:3 Changed 8 years ago by thauber

  • Component changed from Admin interface to Cache system
  • Resolution set to worksforme
  • Status changed from assigned to closed

Please provide more info.
such as:

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