Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

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

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

Download all attachments as: .zip

Change History (10)

by Thomas Kerpe, 16 years ago

Attachment: 8804.diff added

comment:1 by Thomas Kerpe, 16 years ago

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

comment:2 by Thomas Kerpe, 16 years ago

Has patch: set

comment:3 by Thomas Kerpe, 16 years ago

Triage Stage: UnreviewedDesign decision needed

comment:4 by Thomas Kerpe, 16 years ago

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

comment:5 by Malcolm Tredinnick, 16 years ago

milestone: 1.0
Triage Stage: Design decision neededAccepted

comment:6 by Thomas Kerpe, 16 years ago

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"})
'/sitemap-teststringxxml'

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

comment:7 by Thomas Kerpe, 16 years ago

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 by James Bennett, 16 years ago

Resolution: fixed
Status: newclosed

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

comment:9 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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