Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8804 closed (fixed)

Documentation example gives wrong result

Reported by: Thomas Kerpe Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


(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)

8804.diff (751 bytes) - added by Thomas Kerpe 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Thomas Kerpe

Attachment: 8804.diff added

comment:1 Changed 8 years ago by Thomas Kerpe

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

This seems somewhat backwards incompatible. In older Revisions this syntax worked.

comment:2 Changed 8 years ago by Thomas Kerpe

Has patch: set

comment:3 Changed 8 years ago by Thomas Kerpe

Triage Stage: UnreviewedDesign decision needed

comment:4 Changed 8 years ago by Thomas Kerpe

This inconsitency exists since r8760 maybe a bug in Core Framework and not Documentation?

comment:5 Changed 8 years ago by Malcolm Tredinnick

milestone: 1.0
Triage Stage: Design decision neededAccepted

comment:6 Changed 8 years ago by Thomas Kerpe

Component: DocumentationCore 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"})

This happens when a group is followed by a dot in the url pattern.

comment:7 Changed 8 years ago by Thomas Kerpe

Component: Core frameworkDocumentation

After discussion on #django-dev this is a documentation bug. So the patch is valid.

My last comment collided with mtredinnicks.

comment:8 Changed 8 years ago by James Bennett

Resolution: fixed
Status: newclosed

(In [8905]) Fixed #8804: corrected URL example in sitemaps docs

comment:9 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top