Opened 8 years ago

Last modified 8 years ago

#27842 closed New feature

class GenericSitemap doesn't handle "protocol" in __init__ — at Version 11

Reported by: chex Owned by: chex
Component: contrib.sitemaps Version: 1.10
Severity: Normal Keywords: sitemaps genericsitemap
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by chex)

django.contrib.sitemaps.GenericSitemap doesn't accept "protocol" in initial args or kwargs.

some_sitemap = GenericSitemap(
      info_dict={
            'queryset': SomeModel.objects.all(),
        },
        priority=0.6,
        changefreq='yearly',
    )
some_sitemap.protocol = 'https'


GenericSitemap source
Why not to pass protocol as keyword argument?

some_sitemap = GenericSitemap(

info_dict={

'queryset': SomeModel.objects.all(),

},
priority=0.6,
changefreq='yearly',
protocol='https',

)

}}}

Change History (11)

comment:1 by chex, 8 years ago

Description: modified (diff)

comment:2 by chex, 8 years ago

Owner: changed from nobody to chex
Status: newassigned

comment:3 by chex, 8 years ago

Description: modified (diff)

comment:5 by chex, 8 years ago

Has patch: set

comment:6 by Tim Graham, 8 years ago

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

Looks okay at first glance. Documentation and tests are also required.

comment:7 by chex, 8 years ago

Update PR with tests.

comment:8 by Tim Graham, 8 years ago

And documentation? Please update the ticket flags when you update the patch. It looks like the tests are testing more than just what's changed. It's fine to increase test coverage but please do it in a separate commit (perhaps a separate PR that precedes this one).

comment:9 by chex, 8 years ago

Needs tests: unset

comment:10 by chex, 8 years ago

Needs documentation: unset

Update pr with documentation.
Non specific to the ticket tests are moved to another pr.

comment:11 by chex, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top