#14198 closed (fixed)
« None » appears in priority field of sitemaps when using GenericSitemap without specify priority (#14164 related)
Reported by: | palkeo | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | internationalization L10N sitemaps none | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When using GenericSitemap class, and without specifying priority, the template generate an invalid sitemap.
The sitemap contains « <priority>None</priority> »
I think it's because of the #14164 patch : It will apply str() on the priority, even if the priority is None ! Then the priority will be « None ».
To reproduce the problem, apply the #14164 patch and then create a sitemap using GenericSitemap, without specifying priority.
For example :
sitemaps = { [...] 'example': GenericSitemap({ 'queryset': Example.objects.all(), }, ), [...] }
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | patch.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
Here is the patch, that can be applied to django/contrib/sitemaps/init.py :