Example:
{{{
from django.utils import text
text.slugify("___This is a test ---")
output: ___this-is-a-test-
}}}
Improvement after correction
{{{
from django.utils import text
text.slugify("___This is a test ---")
output: this-is-a-test
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28694>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> Bug generation slug
>
> Example:
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: ___this-is-a-test-
> }}}
>
> Improvement after correction
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: this-is-a-test
> }}}
New description:
Bug generation slug
Example:
{{{
from django.utils import text
text.slugify("___This is a test ---")
output: ___this-is-a-test-
}}}
Improvement after correction
{{{
from django.utils import text
text.slugify("___This is a test ---")
output: this-is-a-test
}}}
Fix PR: https://github.com/django/django/pull/8733
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:1>
* status: new => assigned
* owner: nobody => Elinaldo do Nascimento Monteiro
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:2>
* version: 1.11 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:3>
Old description:
> Bug generation slug
>
> Example:
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: ___this-is-a-test-
> }}}
>
> Improvement after correction
>
> {{{
> from django.utils import text
> text.slugify("___This is a test ---")
> output: this-is-a-test
> }}}
>
> Fix PR: https://github.com/django/django/pull/8733
New description:
Bug generation slug
Example:
{{{
from django.utils import text
text.slugify("___This is a test ---")
output: ___this-is-a-test-
}}}
Improvement after correction
{{{
from django.utils import text
text.slugify("___This is a test ---")
output: this-is-a-test
}}}
[https://github.com/django/django/pull/8733 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:4>
* stage: Unreviewed => Accepted
* type: New feature => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:5>
* needs_better_patch: 0 => 1
Comment:
The current version of the patch converts all underscores to dashes which
(as discussed on the PR) isn't an obviously desired change. A discussion
is needed to see if there's consensus about that change.
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:6>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:8>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:9>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"0382ecfe020b4c51b4c01e4e9a21892771e66941" 0382ecfe]:
{{{
#!CommitTicketReference repository=""
revision="0382ecfe020b4c51b4c01e4e9a21892771e66941"
Fixed #28694 -- Made django.utils.text.slugify() strip dashes and
underscores.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28694#comment:10>