mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[1.6.x] Fixed #20765 -- Set small values of step using exponential notation.
Browsers parse small factors of 10 as 0 under decimal notation.
Thanks to Trac alias matklad for the report and Claude Paroz for the review.
Backport of 415a36947c from master.
This commit is contained in:
@@ -576,7 +576,7 @@ class ModelFormsetTest(TestCase):
|
||||
formset = AuthorBooksFormSet2(instance=author)
|
||||
self.assertEqual(len(formset.forms), 1)
|
||||
self.assertHTMLEqual(formset.forms[0].as_p(),
|
||||
'<p><label for="id_bookwithcustompk_set-0-my_pk">My pk:</label> <input id="id_bookwithcustompk_set-0-my_pk" type="number" name="bookwithcustompk_set-0-my_pk" /></p>\n'
|
||||
'<p><label for="id_bookwithcustompk_set-0-my_pk">My pk:</label> <input id="id_bookwithcustompk_set-0-my_pk" type="number" name="bookwithcustompk_set-0-my_pk" step="1" /></p>\n'
|
||||
'<p><label for="id_bookwithcustompk_set-0-title">Title:</label> <input id="id_bookwithcustompk_set-0-title" type="text" name="bookwithcustompk_set-0-title" maxlength="100" /><input type="hidden" name="bookwithcustompk_set-0-author" value="1" id="id_bookwithcustompk_set-0-author" /></p>')
|
||||
|
||||
data = {
|
||||
|
||||
Reference in New Issue
Block a user