Code

Opened 7 years ago

Closed 7 years ago

#4004 closed (duplicate)

Need a newforms.FloatField field

Reported by: tonnzor <tonn81@…> Owned by: anonymous
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Newforms contains IntegerField for handling sharp numbers, but do not have FloatField for handling all other numbers.

If this bug is accepted I write a patch.

Attachments (2)

FloatField.diff (5.8 KB) - added by tonnzor <tonn81@…> 7 years ago.
FloatField
FloatField.2.diff (5.9 KB) - added by tonnzor <tonn81@…> 7 years ago.
FloatField (fixed error message)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Simon G. <dev@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by tonnzor <tonn81@…>

  • Has patch set
  • Owner changed from adrian to anonymous
  • Status changed from new to assigned

Patch seems a bit complicated, but it supports max_digits and decimal_places parameters (similar to django.db.models.FloatField)

Error messages might be improved.

The patch contains test suite too.

comment:3 Changed 7 years ago by tonnzor <tonn81@…>

I have a patch, but see no field to attach it to this ticket :(

Changed 7 years ago by tonnzor <tonn81@…>

FloatField

Changed 7 years ago by tonnzor <tonn81@…>

FloatField (fixed error message)

comment:4 Changed 7 years ago by mtredinnick

See also #3238 for an alternative patch.

comment:5 Changed 7 years ago by mtredinnick

  • Resolution set to duplicate
  • Status changed from assigned to closed

Closign in favour of #2365.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.