I think Django should pick one style and use it consistently for all user
facing APIs.
For example:
{{{str.format()}}} syntax
* [https://docs.djangoproject.com/en/1.9/ref/class-based-views/mixins-
editing/#django.views.generic.edit.ModelFormMixin.success_url success_url]
*
[https://docs.djangoproject.com/en/1.9/ref/utils/#django.utils.html.format_html
format_html()]
Legacy % syntax
* [https://docs.djangoproject.com/en/1.9/ref/forms/validation/#raising-
validationerror ValidationError]
* [https://docs.djangoproject.com/en/1.9/topics/db/models/#be-careful-
with-related-name related_name]
As {{{success_url}}} recently moved to {{{str.format()}}}, I'm guessing
this is Django's preferred style?
I'm suggesting Django deprecate its use of the legacy % syntax in favor of
{{{str.format()}}} syntax. I think this would create a greater API
consistency throughout the framework.
[https://groups.google.com/forum/#!topic/django-developers/J9CfWIgrgbY
django-developers discussion]
--
Ticket URL: <https://code.djangoproject.com/ticket/26250>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Someday/Maybe
* component: Uncategorized => Core (Other)
* needs_tests: => 0
* needs_docs: => 0
Comment:
Pending outcome of mailing discussion.
--
Ticket URL: <https://code.djangoproject.com/ticket/26250#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
In my opinion, the discussion didn't reveal any strong argument in favor
of this move.
Summarizing James Bennett's post:
use format() in future commits if it's cleaner, or just adopt a policy
of "if you're in there making a change and it won't break back compat,
feel free to update to format() while you're at it".
--
Ticket URL: <https://code.djangoproject.com/ticket/26250#comment:2>