#8804 closed (fixed)
Documentation example gives wrong result
Reported by: | Thomas Kerpe | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
(r'^sitemap-(?P<section>.+).xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
This won't work. and results in sitemap-mysectionnamexxml instead of sitemap-mysectionname.xml
This will work:
(r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
Attachments (1)
Change History (10)
by , 16 years ago
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Has patch: | set |
---|
comment:3 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 16 years ago
This inconsitency exists since r8760 maybe a bug in Core Framework and not Documentation?
comment:5 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Design decision needed → Accepted |
comment:6 by , 16 years ago
Component: | Documentation → Core framework |
---|---|
Keywords: | trivial removed |
This is also affects different other applications:
>>> from django.core.urlresolvers import reverse >>> reverse('django.contrib.sitemaps.views.sitemap', kwargs={'section': "teststring"}) '/sitemap-teststringxxml'
This happens when a group is followed by a dot in the url pattern.
comment:7 by , 16 years ago
Component: | Core framework → Documentation |
---|
After discussion on #django-dev this is a documentation bug. So the patch is valid.
My last comment collided with mtredinnicks.
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This seems somewhat backwards incompatible. In older Revisions this syntax worked.