#31540: A 404 error with “id-” in slug on multilingual website with Indonesian
language
-------------------------------+--------------------------------------
Reporter: osxisl | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 3.0
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 osxisl:
Old description:
> http://example.com/de/id-button/ - 200 OK
> http://example.com/id/id-button/ - 200 OK
> http://example.com/any-other-slug/ - 200 OK
> http://example.com/id-button/ - 404 error:
> {{{
> Using the URLconf defined in example.urls, Django tried these URL
> patterns, in this order:
> id/
> The current path, id-button/, didn't match any of these.
> urls.py file:
> }}}
>
> {{{
> urlpatterns = i18n_patterns(
> path('admin/', admin.site.urls),
> path('', cache_page(cache_homepage)(homepage_views.index),
> name='index'),
> path('search/', search_views.search, name='search'),
> path('<slug:slug>/', emoji_views.emoji, name='item'),
> prefix_default_language=False,
> )
> }}}
>
> The item have a slug field in DB "id-button". If I rename this to
> "idbutton": http://example.com/idbutton/ - 200 OK
New description:
http://example.com/de/id-button/ - 200 OK
http://example.com/id/id-button/ - 200 OK
http://example.com/any-other-slug/ - 200 OK
http://example.com/id-button/ - 404 error:
{{{
Using the URLconf defined in example.urls, Django tried these URL
patterns, in this order:
id/
The current path, id-button/, didn't match any of these.
urls.py file:
}}}
{{{
urlpatterns = i18n_patterns(
path('admin/', admin.site.urls),
path('', cache_page(cache_homepage)(homepage_views.index),
name='index'),
path('search/', search_views.search, name='search'),
path('<slug:slug>/', item_views.emoji, name='item'),
prefix_default_language=False,
)
}}}
The item have a slug field in DB "id-button". If I rename this to
"idbutton": http://example.com/idbutton/ - 200 OK
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31540#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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.00035f8335820b8ebef0511c842c795e%40djangoproject.com.