shortcuts.render_to_response()

render_to_response(template_name, context=None, content_type=None, status=None, using=None) [source] This function preceded the introduction of render() and works similarly except that it doesn’t make the request available in the response. It’s not recommended and is likely to be deprecated in the future.

sitemaps.GenericSitemap

class GenericSitemap [source] The django.contrib.sitemaps.GenericSitemap class allows you to create a sitemap by passing it a dictionary which has to contain at least a queryset entry. This queryset will be used to generate the items of the sitemap. It may also have a date_field entry that specifies a date field for objects retrieved from the queryset. This will be used for the lastmod attribute in the generated sitemap. You may also pass priority and changefreq keyword arguments to the Gene

sitemaps.ping_google()

ping_google() [source] ping_google() takes an optional argument, sitemap_url, which should be the absolute path to your site’s sitemap (e.g., '/sitemap.xml'). If this argument isn’t provided, ping_google() will attempt to figure out your sitemap by performing a reverse looking in your URLconf. ping_google() raises the exception django.contrib.sitemaps.SitemapNotFound if it cannot determine your sitemap URL. Register with Google first! The ping_google() command only works if you have registe

sitemaps.Sitemap

class Sitemap [source] A Sitemap class can define the following methods/attributes: items [source] Required. A method that returns a list of objects. The framework doesn’t care what type of objects they are; all that matters is that these objects get passed to the location(), lastmod(), changefreq() and priority() methods. location [source] Optional. Either a method or attribute. If it’s a method, it should return the absolute path for a given object as returned by items(). If it’s

sitemaps.Sitemap.changefreq

changefreq Optional. Either a method or attribute. If it’s a method, it should take one argument – an object as returned by items() – and return that object’s change frequency as a string. If it’s an attribute, its value should be a string representing the change frequency of every object returned by items(). Possible values for changefreq, whether you use a method or attribute, are: 'always' 'hourly' 'daily' 'weekly' 'monthly' 'yearly' 'never'

sitemaps.Sitemap.i18n

i18n Optional. A boolean attribute that defines if the URLs of this sitemap should be generated using all of your LANGUAGES. The default is False.

sitemaps.Sitemap.items

items [source] Required. A method that returns a list of objects. The framework doesn’t care what type of objects they are; all that matters is that these objects get passed to the location(), lastmod(), changefreq() and priority() methods.

sitemaps.Sitemap.lastmod

lastmod Optional. Either a method or attribute. If it’s a method, it should take one argument – an object as returned by items() – and return that object’s last-modified date/time as a datetime. If it’s an attribute, its value should be a datetime representing the last-modified date/time for every object returned by items(). If all items in a sitemap have a lastmod, the sitemap generated by views.sitemap() will have a Last-Modified header equal to the latest lastmod. You can activate the Con

sitemaps.Sitemap.limit

limit Optional. This attribute defines the maximum number of URLs included on each page of the sitemap. Its value should not exceed the default value of 50000, which is the upper limit allowed in the Sitemaps protocol.

sitemaps.Sitemap.location

location [source] Optional. Either a method or attribute. If it’s a method, it should return the absolute path for a given object as returned by items(). If it’s an attribute, its value should be a string representing an absolute path to use for every object returned by items(). In both cases, “absolute path” means a URL that doesn’t include the protocol or domain. Examples: Good: '/foo/bar/' Bad: 'example.com/foo/bar/' Bad: 'https://example.com/foo/bar/' If location isn’t provided, the