#28340: USE_THOUSAND_SEPARATOR=True causes primary key to include commas -----------------------------------------+------------------------ Reporter: Zach Borboa | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: master 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 | -----------------------------------------+------------------------ When {{{USE_THOUSAND_SEPARATOR=True}}}, an object's primary key (pk) and identifier (id) fields unexpectedly include commas when used in templates.
Example: Say I include {{{<input name="article_id" value="{{ obj.pk }}">}}} in a template with a submit button to save an article, saves will eventually fail {{{QuerySet.get(pk='1,000')}}} containing a comma. Using {{{ {{ object.pk }} }}} in a template will initially work, but later fail when the 1000th entry is saved. Possible solution: Display numbers using a thousand separator when {{{USE_THOUSAND_SEPARATOR=True}}}, except for an object's pk and object's id fields as these are understood to be keys and identifiers, respectively. -- Ticket URL: <https://code.djangoproject.com/ticket/28340> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.4ba3b0cb5d74f1f0c67dec76f3eba66c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.