Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8804 closed (fixed)

Documentation example gives wrong result

Reported by: toke 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 toke 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by toke

comment:1 Changed 7 years ago by toke

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

comment:2 Changed 7 years ago by toke

  • Has patch set

comment:3 Changed 7 years ago by toke

  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 7 years ago by toke

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

comment:5 Changed 7 years ago by mtredinnick

  • milestone set to 1.0
  • Triage Stage changed from Design decision needed to Accepted

comment:6 Changed 7 years ago by toke

  • Component changed from Documentation to 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"})

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

comment:7 Changed 7 years ago by toke

  • Component changed from Core framework to Documentation

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

My last comment collided with mtredinnicks.

comment:8 Changed 7 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:9 Changed 4 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

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