[Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Django
#28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized
-------------------------------------------+------------------------
               Reporter:  George Tantiras  |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Uncategorized    |        Version:  1.11
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 After upgrading to Django 1.11, when a foreignkey points to an id with
 more than 3 digits, it gets localized:

 {{{

 Exception raised while rendering {% include %} for template
 'admin/change_form.html'. Empty string rendered instead.
 Traceback (most recent call last):
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/loader_tags.py", line 216, in render
     return template.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 209, in render
     return self._render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 199, in _render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 529, in render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 411, in render
     return
 strip_spaces_between_tags(self.nodelist.render(context).strip())
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 322, in render
     return nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1046, in render
     return render_value_in_context(output, context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1024, in render_value_in_context
     value = force_text(value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/encoding.py", line 76, in force_text
     s = six.text_type(s)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/html.py", line 385, in <lambda>
     klass.__str__ = lambda self: mark_safe(klass_str(self))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 41, in __str__
     return self.as_widget()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 120, in as_widget
     **kwargs
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/contrib/admin/widgets.py", line 281, in get_context
     'rendered_widget': self.widget.render(name, value, attrs),
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 150, in render
     widget = super(WidgetMixin, self).render(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 665, in get_context
     context = super(Select, self).get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 627, in get_context
     context['widget']['optgroups'] = self.optgroups(name,
 context['widget']['value'], attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 140, in optgroups
     self.filter_choices_to_render(selected_choices)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 183, in filter_choices_to_render
     pk__in=[c for c in selected_choices if c]
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 781, in filter
     return self._filter_or_exclude(False, *args, **kwargs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 799, in _filter_or_exclude
     clone.query.add_q(Q(*args, **kwargs))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1260, in add_q
     clause, _ = self._add_q(q_object, self.used_aliases)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1286, in _add_q
     allow_joins=allow_joins, split_subq=split_subq,
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1220, in build_filter
     condition = self.build_lookup(lookups, col, value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1114, in build_lookup
     return final_lookup(lhs, rhs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 24, in __init__
     self.rhs = self.get_prep_lookup()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 219, in get_prep_lookup
     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/fields/__init__.py", line 962, in get_prep_value
     return int(value)
 ValueError: invalid literal for int() with base 10: '1.211'
 }}}

 Changing the setting:

 {{{
 USE_THOUSANDS_SEPARATOR = False
 }}}

 renders everything back to normal.

--
Ticket URL: <https://code.djangoproject.com/ticket/28075>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.8b604007a3bbca057e7a3e1dd7b916eb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Django
#28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Description changed by George Tantiras:

Old description:

> After upgrading to Django 1.11, when a foreignkey points to an id with
> more than 3 digits, it gets localized:
>
> {{{
>
> Exception raised while rendering {% include %} for template
> 'admin/change_form.html'. Empty string rendered instead.
> Traceback (most recent call last):
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/loader_tags.py", line 216, in render
>     return template.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 209, in render
>     return self._render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 199, in _render
>     return self.nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 216, in render
>     nodelist.append(node.render_annotated(context))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 529, in render
>     return self.nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 216, in render
>     nodelist.append(node.render_annotated(context))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 411, in render
>     return
> strip_spaces_between_tags(self.nodelist.render(context).strip())
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 322, in render
>     return nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 1046, in render
>     return render_value_in_context(output, context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 1024, in render_value_in_context
>     value = force_text(value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/utils/encoding.py", line 76, in force_text
>     s = six.text_type(s)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/utils/html.py", line 385, in <lambda>
>     klass.__str__ = lambda self: mark_safe(klass_str(self))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/boundfield.py", line 41, in __str__
>     return self.as_widget()
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/boundfield.py", line 120, in as_widget
>     **kwargs
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 220, in render
>     context = self.get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/contrib/admin/widgets.py", line 281, in get_context
>     'rendered_widget': self.widget.render(name, value, attrs),
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 150, in render
>     widget = super(WidgetMixin, self).render(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 220, in render
>     context = self.get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 665, in get_context
>     context = super(Select, self).get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 627, in get_context
>     context['widget']['optgroups'] = self.optgroups(name,
> context['widget']['value'], attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 140, in optgroups
>     self.filter_choices_to_render(selected_choices)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 183, in filter_choices_to_render
>     pk__in=[c for c in selected_choices if c]
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/query.py", line 781, in filter
>     return self._filter_or_exclude(False, *args, **kwargs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/query.py", line 799, in _filter_or_exclude
>     clone.query.add_q(Q(*args, **kwargs))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1260, in add_q
>     clause, _ = self._add_q(q_object, self.used_aliases)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1286, in _add_q
>     allow_joins=allow_joins, split_subq=split_subq,
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1220, in build_filter
>     condition = self.build_lookup(lookups, col, value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1114, in build_lookup
>     return final_lookup(lhs, rhs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/lookups.py", line 24, in __init__
>     self.rhs = self.get_prep_lookup()
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/lookups.py", line 219, in get_prep_lookup
>     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/fields/__init__.py", line 962, in
> get_prep_value
>     return int(value)
> ValueError: invalid literal for int() with base 10: '1.211'
> }}}
>
> Changing the setting:
>
> {{{
> USE_THOUSANDS_SEPARATOR = False
> }}}
>
> renders everything back to normal.
New description:

 After upgrading to Django 1.11, when a foreignkey points to an id with
 more than 3 digits, it gets localized.

 In django admin, when I hit "Save and Continue Editing", I receive the
 following error:

 {{{

 Exception raised while rendering {% include %} for template
 'admin/change_form.html'. Empty string rendered instead.
 Traceback (most recent call last):
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/loader_tags.py", line 216, in render
     return template.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 209, in render
     return self._render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 199, in _render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 529, in render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 411, in render
     return
 strip_spaces_between_tags(self.nodelist.render(context).strip())
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 322, in render
     return nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1046, in render
     return render_value_in_context(output, context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1024, in render_value_in_context
     value = force_text(value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/encoding.py", line 76, in force_text
     s = six.text_type(s)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/html.py", line 385, in <lambda>
     klass.__str__ = lambda self: mark_safe(klass_str(self))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 41, in __str__
     return self.as_widget()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 120, in as_widget
     **kwargs
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/contrib/admin/widgets.py", line 281, in get_context
     'rendered_widget': self.widget.render(name, value, attrs),
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 150, in render
     widget = super(WidgetMixin, self).render(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 665, in get_context
     context = super(Select, self).get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 627, in get_context
     context['widget']['optgroups'] = self.optgroups(name,
 context['widget']['value'], attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 140, in optgroups
     self.filter_choices_to_render(selected_choices)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 183, in filter_choices_to_render
     pk__in=[c for c in selected_choices if c]
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 781, in filter
     return self._filter_or_exclude(False, *args, **kwargs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 799, in _filter_or_exclude
     clone.query.add_q(Q(*args, **kwargs))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1260, in add_q
     clause, _ = self._add_q(q_object, self.used_aliases)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1286, in _add_q
     allow_joins=allow_joins, split_subq=split_subq,
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1220, in build_filter
     condition = self.build_lookup(lookups, col, value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1114, in build_lookup
     return final_lookup(lhs, rhs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 24, in __init__
     self.rhs = self.get_prep_lookup()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 219, in get_prep_lookup
     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/fields/__init__.py", line 962, in get_prep_value
     return int(value)
 ValueError: invalid literal for int() with base 10: '1.211'
 }}}

 Changing the setting:

 {{{
 USE_THOUSANDS_SEPARATOR = False
 }}}

 renders everything back to normal.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.9a58fe17c60590ed569077c0076c2bde%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Description changed by George Tantiras:

Old description:

> After upgrading to Django 1.11, when a foreignkey points to an id with
> more than 3 digits, it gets localized.
>
> In django admin, when I hit "Save and Continue Editing", I receive the
> following error:
>
> {{{
>
> Exception raised while rendering {% include %} for template
> 'admin/change_form.html'. Empty string rendered instead.
> Traceback (most recent call last):
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/loader_tags.py", line 216, in render
>     return template.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 209, in render
>     return self._render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 199, in _render
>     return self.nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 216, in render
>     nodelist.append(node.render_annotated(context))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 529, in render
>     return self.nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 216, in render
>     nodelist.append(node.render_annotated(context))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 411, in render
>     return
> strip_spaces_between_tags(self.nodelist.render(context).strip())
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 322, in render
>     return nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 1046, in render
>     return render_value_in_context(output, context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 1024, in render_value_in_context
>     value = force_text(value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/utils/encoding.py", line 76, in force_text
>     s = six.text_type(s)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/utils/html.py", line 385, in <lambda>
>     klass.__str__ = lambda self: mark_safe(klass_str(self))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/boundfield.py", line 41, in __str__
>     return self.as_widget()
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/boundfield.py", line 120, in as_widget
>     **kwargs
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 220, in render
>     context = self.get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/contrib/admin/widgets.py", line 281, in get_context
>     'rendered_widget': self.widget.render(name, value, attrs),
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 150, in render
>     widget = super(WidgetMixin, self).render(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 220, in render
>     context = self.get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 665, in get_context
>     context = super(Select, self).get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 627, in get_context
>     context['widget']['optgroups'] = self.optgroups(name,
> context['widget']['value'], attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 140, in optgroups
>     self.filter_choices_to_render(selected_choices)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 183, in filter_choices_to_render
>     pk__in=[c for c in selected_choices if c]
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/query.py", line 781, in filter
>     return self._filter_or_exclude(False, *args, **kwargs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/query.py", line 799, in _filter_or_exclude
>     clone.query.add_q(Q(*args, **kwargs))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1260, in add_q
>     clause, _ = self._add_q(q_object, self.used_aliases)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1286, in _add_q
>     allow_joins=allow_joins, split_subq=split_subq,
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1220, in build_filter
>     condition = self.build_lookup(lookups, col, value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1114, in build_lookup
>     return final_lookup(lhs, rhs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/lookups.py", line 24, in __init__
>     self.rhs = self.get_prep_lookup()
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/lookups.py", line 219, in get_prep_lookup
>     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/fields/__init__.py", line 962, in
> get_prep_value
>     return int(value)
> ValueError: invalid literal for int() with base 10: '1.211'
> }}}
>
> Changing the setting:
>
> {{{
> USE_THOUSANDS_SEPARATOR = False
> }}}
>
> renders everything back to normal.
New description:

 After upgrading to Django 1.11, when a foreignkey points to an id with
 more than 3 digits, it gets localized.

 In django admin, when I visit an already existing instance and hit "Save
 and Continue Editing", I receive the following error:

 {{{

 Exception raised while rendering {% include %} for template
 'admin/change_form.html'. Empty string rendered instead.
 Traceback (most recent call last):
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/loader_tags.py", line 216, in render
     return template.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 209, in render
     return self._render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 199, in _render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 529, in render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 411, in render
     return
 strip_spaces_between_tags(self.nodelist.render(context).strip())
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 322, in render
     return nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1046, in render
     return render_value_in_context(output, context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1024, in render_value_in_context
     value = force_text(value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/encoding.py", line 76, in force_text
     s = six.text_type(s)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/html.py", line 385, in <lambda>
     klass.__str__ = lambda self: mark_safe(klass_str(self))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 41, in __str__
     return self.as_widget()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 120, in as_widget
     **kwargs
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/contrib/admin/widgets.py", line 281, in get_context
     'rendered_widget': self.widget.render(name, value, attrs),
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 150, in render
     widget = super(WidgetMixin, self).render(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 665, in get_context
     context = super(Select, self).get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 627, in get_context
     context['widget']['optgroups'] = self.optgroups(name,
 context['widget']['value'], attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 140, in optgroups
     self.filter_choices_to_render(selected_choices)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 183, in filter_choices_to_render
     pk__in=[c for c in selected_choices if c]
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 781, in filter
     return self._filter_or_exclude(False, *args, **kwargs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 799, in _filter_or_exclude
     clone.query.add_q(Q(*args, **kwargs))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1260, in add_q
     clause, _ = self._add_q(q_object, self.used_aliases)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1286, in _add_q
     allow_joins=allow_joins, split_subq=split_subq,
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1220, in build_filter
     condition = self.build_lookup(lookups, col, value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1114, in build_lookup
     return final_lookup(lhs, rhs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 24, in __init__
     self.rhs = self.get_prep_lookup()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 219, in get_prep_lookup
     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/fields/__init__.py", line 962, in get_prep_value
     return int(value)
 ValueError: invalid literal for int() with base 10: '1.211'
 }}}

 Changing the setting:

 {{{
 USE_THOUSANDS_SEPARATOR = False
 }}}

 renders everything back to normal.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.0bb1ee36d1463ee6357abbcc456be8f6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Tim Graham):

 In the traceback, I see you're using django-autocomplete-light (dal). Can
 you reproduce this issue without that package to rule out an issue there?
 Could you provide a sample project to more easily reproduce the issue. I
 tried to briefly reproduce it using but putting a foreign key in
 `ModelAdmin.raw_id_fields` but couldn't reproduce. Ideally, you could also
 [https://docs.djangoproject.com/en/dev/internals/contributing/triaging-
 tickets/#bisecting-a-regression bisect] to find the commit where the
 behavior changed.

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.2d9da69354f02c15c15a410f5bf0823d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  closed
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:  needsinfo
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.9d6032f858f52b4b314fce9a42cab503%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  closed
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:  needsinfo
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by George Tantiras):

 To reproduce the issue, I followed the below steps:

 In a fresh django-1.11 installation:

 * Create the app ```separ```
 * separ/models.py:
 {{{
 from django.db import models


 class Parent(models.Model):
     a_field = models.BooleanField()


 class Child(models.Model):
     parent_key = models.ForeignKey(Parent)
 }}}
 * separ/admin.py:
 {{{
 from django.contrib import admin
 from separ.models import Parent, Child


 class ParentAdmin(admin.ModelAdmin):
     pass

 admin.site.register(Parent, ParentAdmin)


 class ChildAdmin(admin.ModelAdmin):
     pass

 admin.site.register(Child, ChildAdmin)
 }}}
 * in the settings.py file add the ```separ``` module in the
 ```INSTALLED_APPS``` and the line:
 {{{
     USE_THOUSAND_SEPARATOR = True
 }}}
 * Load the Parent model with data:
 {{{
 >>> from separ.models import Parent, Child
 >>> for i in range(1,1500):
 ...        a = Parent(a_field = True)
 ...        a.save()
 >>> a = Parent.objects.get(id=1235)
 >>> b = Child(parent_key=a)
 >>> b.save()
 }}}
 * Visit the relevant url and hit 'Save and Add Another":
 {{{
 http://127.0.0.1:8000/admin/separ/child/1/change/
 }}}

 An error message appears: ```Select a valid choice. That choice is not one
 of the available choices.```

 Trying to debug the error I have found that:
 {{{
 /home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/contrib/admin/options.py(1438)_changeform_view()
    1437         ModelForm = self.get_form(request, obj)
 -> 1438         if request.method == 'POST':
    1439             form = ModelForm(request.POST, request.FILES,
 instance=obj)

 ipdb> request.POST
 <QueryDict: {'parent_key': ['1.235'], ... }
 }}}

 The result of the ```request.POST``` command contains the id of the
 related model localised: ```['1.235']```.

 I have not yet performed a bisect because I have not done it before, but I
 will give it a try.

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.c51cc53b93ab807f6cb01ff6d252f85c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized (was: USE_THOUSANDS_SEPARATOR = True, causes foreignkey id to become localized)

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  closed
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:  needsinfo
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.f7a84a9e2b0cdaeaf380ab1ce6c15339%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  closed
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:  needsinfo
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Description changed by George Tantiras:

Old description:

> After upgrading to Django 1.11, when a foreignkey points to an id with
> more than 3 digits, it gets localized.
>
> In django admin, when I visit an already existing instance and hit "Save
> and Continue Editing", I receive the following error:
>
> {{{
>
> Exception raised while rendering {% include %} for template
> 'admin/change_form.html'. Empty string rendered instead.
> Traceback (most recent call last):
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/loader_tags.py", line 216, in render
>     return template.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 209, in render
>     return self._render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 199, in _render
>     return self.nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 216, in render
>     nodelist.append(node.render_annotated(context))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 529, in render
>     return self.nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 216, in render
>     nodelist.append(node.render_annotated(context))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 411, in render
>     return
> strip_spaces_between_tags(self.nodelist.render(context).strip())
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/defaulttags.py", line 322, in render
>     return nodelist.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 990, in render
>     bit = node.render_annotated(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 957, in render_annotated
>     return self.render(context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 1046, in render
>     return render_value_in_context(output, context)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/template/base.py", line 1024, in render_value_in_context
>     value = force_text(value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/utils/encoding.py", line 76, in force_text
>     s = six.text_type(s)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/utils/html.py", line 385, in <lambda>
>     klass.__str__ = lambda self: mark_safe(klass_str(self))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/boundfield.py", line 41, in __str__
>     return self.as_widget()
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/boundfield.py", line 120, in as_widget
>     **kwargs
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 220, in render
>     context = self.get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/contrib/admin/widgets.py", line 281, in get_context
>     'rendered_widget': self.widget.render(name, value, attrs),
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 150, in render
>     widget = super(WidgetMixin, self).render(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 220, in render
>     context = self.get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 665, in get_context
>     context = super(Select, self).get_context(name, value, attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/forms/widgets.py", line 627, in get_context
>     context['widget']['optgroups'] = self.optgroups(name,
> context['widget']['value'], attrs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 140, in optgroups
>     self.filter_choices_to_render(selected_choices)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/dal/widgets.py", line 183, in filter_choices_to_render
>     pk__in=[c for c in selected_choices if c]
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/query.py", line 781, in filter
>     return self._filter_or_exclude(False, *args, **kwargs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/query.py", line 799, in _filter_or_exclude
>     clone.query.add_q(Q(*args, **kwargs))
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1260, in add_q
>     clause, _ = self._add_q(q_object, self.used_aliases)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1286, in _add_q
>     allow_joins=allow_joins, split_subq=split_subq,
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1220, in build_filter
>     condition = self.build_lookup(lookups, col, value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/sql/query.py", line 1114, in build_lookup
>     return final_lookup(lhs, rhs)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/lookups.py", line 24, in __init__
>     self.rhs = self.get_prep_lookup()
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/lookups.py", line 219, in get_prep_lookup
>     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
>   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
> packages/django/db/models/fields/__init__.py", line 962, in
> get_prep_value
>     return int(value)
> ValueError: invalid literal for int() with base 10: '1.211'
> }}}
>
> Changing the setting:
>
> {{{
> USE_THOUSANDS_SEPARATOR = False
> }}}
>
> renders everything back to normal.
New description:

 After upgrading to Django 1.11, when a foreignkey points to an id with
 more than 3 digits, it gets localized.

 In django admin, when I visit an already existing instance and hit "Save
 and Continue Editing", I receive the following error:

 {{{

 Exception raised while rendering {% include %} for template
 'admin/change_form.html'. Empty string rendered instead.
 Traceback (most recent call last):
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/loader_tags.py", line 216, in render
     return template.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 209, in render
     return self._render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 199, in _render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 529, in render
     return self.nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 216, in render
     nodelist.append(node.render_annotated(context))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 411, in render
     return
 strip_spaces_between_tags(self.nodelist.render(context).strip())
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/defaulttags.py", line 322, in render
     return nodelist.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1046, in render
     return render_value_in_context(output, context)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/template/base.py", line 1024, in render_value_in_context
     value = force_text(value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/encoding.py", line 76, in force_text
     s = six.text_type(s)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/utils/html.py", line 385, in <lambda>
     klass.__str__ = lambda self: mark_safe(klass_str(self))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 41, in __str__
     return self.as_widget()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/boundfield.py", line 120, in as_widget
     **kwargs
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/contrib/admin/widgets.py", line 281, in get_context
     'rendered_widget': self.widget.render(name, value, attrs),
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 150, in render
     widget = super(WidgetMixin, self).render(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 220, in render
     context = self.get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 665, in get_context
     context = super(Select, self).get_context(name, value, attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/forms/widgets.py", line 627, in get_context
     context['widget']['optgroups'] = self.optgroups(name,
 context['widget']['value'], attrs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 140, in optgroups
     self.filter_choices_to_render(selected_choices)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/dal/widgets.py", line 183, in filter_choices_to_render
     pk__in=[c for c in selected_choices if c]
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 781, in filter
     return self._filter_or_exclude(False, *args, **kwargs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/query.py", line 799, in _filter_or_exclude
     clone.query.add_q(Q(*args, **kwargs))
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1260, in add_q
     clause, _ = self._add_q(q_object, self.used_aliases)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1286, in _add_q
     allow_joins=allow_joins, split_subq=split_subq,
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1220, in build_filter
     condition = self.build_lookup(lookups, col, value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/sql/query.py", line 1114, in build_lookup
     return final_lookup(lhs, rhs)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 24, in __init__
     self.rhs = self.get_prep_lookup()
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/lookups.py", line 219, in get_prep_lookup
     rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
   File "/home/flyer/.virtualenvs/erad/lib/python3.4/site-
 packages/django/db/models/fields/__init__.py", line 962, in get_prep_value
     return int(value)
 ValueError: invalid literal for int() with base 10: '1.211'
 }}}

 Changing the setting:

 {{{
 USE_THOUSAND_SEPARATOR = False
 }}}

 renders everything back to normal.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.3a49bb4130e93669e8eb91d41b9de7d5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Changes (by George Tantiras):

 * status:  closed => new
 * resolution:  needsinfo =>


--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.b519fd68e15704c64e849950cf315d19%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Tim Graham):

 Which locale are you using?

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.1b2d2ed9ce71259bf1a78d27d723505c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by George Tantiras):

 In the example, am using the settings.py as it comes with the default
 django installation.
 However, if it might make sense, I have the following files in my project
 tree, for the locales en, el:
 * <project name>formats/en/formats.py, <project name>formats/el/formats.py
 {{{
 DATE_FORMAT = 'd-m-Y'
 TIME_FORMAT = 'H:i'
 DATETIME_FORMAT = 'd-m-Y H:i'
 YEAR_MONTH_FORMAT = 'F Y'
 MONTH_DAY_FORMAT = 'F j'
 SHORT_DATE_FORMAT = 'm/d/Y'
 SHORT_DATETIME_FORMAT = 'm/d/Y P'
 FIRST_DAY_OF_WEEK = 1

 # BUT here use the Python strftime format syntax,
 # LIST: http://docs.python.org/library/datetime.html#strftime-strptime-
 behavior

 DATE_INPUT_FORMATS = (
     '%d-%m-%Y',     # '21-03-2014'
 )
 TIME_INPUT_FORMATS = (
     '%H:%M:%S',     # '17:59:59'
     '%H:%M',        # '17:59'
 )
 DATETIME_INPUT_FORMATS = (
     '%d-%m-%Y %H:%M',     # '21-03-2014 17:59'
 )

 DECIMAL_SEPARATOR = ','
 THOUSAND_SEPARATOR = '.'
 NUMBER_GROUPING = 3
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.a2de049a56956619fff2c87d4507701f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Tim Graham):

 Unfortunately, I still can't reproduce. Can you provide a sample project I
 could download and run?

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.7b5e5659790e148029bc8782650bd202%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by George Tantiras):

 I have uploaded a slightly modified default project which reflects the
 issue under Python 3.4.2 here:

 https://github.com/raratiru/28075

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.4bda33f898ed6953402a88bd7c949f9c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by Tim Graham):

 * type:  Uncategorized => Bug
 * component:  Uncategorized => Forms
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Thanks, I can reproduce using that project. I bisected the regression to
 6d8979f4c2fbfb9fd5db92acd72489cbbcbdd5d1.

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.1471609c6b233300082d8dc6b8edf518%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by Tim Graham):

 * cc: Jon Dufresne (added)


Comment:

 I marked #28090 as a duplicate -- it's another case where the `<select>`
 `value` is inadvertently localized.

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:14>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5d975f13972400fbd8071bc03f82e3a2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+----------------------------------------
     Reporter:  George Tantiras  |                    Owner:  Jon Dufresne
         Type:  Bug              |                   Status:  assigned
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+----------------------------------------
Changes (by Jon Dufresne):

 * status:  new => assigned
 * owner:  nobody => Jon Dufresne


Comment:

 I can reproduce and have written a test. I'll further investigate a fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:15>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.e40efc1e3a38d1099a9472a77c43ce64%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+----------------------------------------
     Reporter:  George Tantiras  |                    Owner:  Jon Dufresne
         Type:  Bug              |                   Status:  assigned
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+----------------------------------------
Changes (by Jon Dufresne):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/8385 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:16>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.b5b66aee7839197ad0702fe388c7553c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+----------------------------------------
     Reporter:  George Tantiras  |                    Owner:  Jon Dufresne
         Type:  Bug              |                   Status:  closed
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:  fixed
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+----------------------------------------
Changes (by Tim Graham <timograham@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"581879a510e58841e5780a5d1fdb4995733d2036" 581879a]:
 {{{
 #!CommitTicketReference repository=""
 revision="581879a510e58841e5780a5d1fdb4995733d2036"
 Fixed #28075 -- Prevented ChoiceWidget from localizing option values.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5abbad5e2ff3e94bbc9625c61fd5ef8d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized

Django
In reply to this post by Django
#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+----------------------------------------
     Reporter:  George Tantiras  |                    Owner:  Jon Dufresne
         Type:  Bug              |                   Status:  closed
    Component:  Forms            |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:  fixed
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+----------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"1442e299839febf9599e98dff2e6bb6da24df0ac" 1442e299]:
 {{{
 #!CommitTicketReference repository=""
 revision="1442e299839febf9599e98dff2e6bb6da24df0ac"
 [1.11.x] Fixed #28075 -- Prevented ChoiceWidget from localizing option
 values.

 Backport of 581879a510e58841e5780a5d1fdb4995733d2036 from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.7d6b633197668202817cefccbee47595%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Loading...