staticfiles.storage.StaticFilesStorage.post_process()

storage.StaticFilesStorage.post_process(paths, **options) This method is called by the collectstatic management command after each run and gets passed the local storages and paths of found files as a dictionary, as well as the command line options. The CachedStaticFilesStorage uses this behind the scenes to replace the paths with their hashed counterparts and update the cache appropriately.

sites.shortcuts.get_current_site()

shortcuts.get_current_site(request) A function that checks if django.contrib.sites is installed and returns either the current Site object or a RequestSite object based on the request. It looks up the current site based on request.get_host() if the SITE_ID setting is not defined. Both a domain and a port may be returned by request.get_host() when the Host header has a port explicitly specified, e.g. example.com:80. In such cases, if the lookup fails because the host does not match a record i

staticfiles.storage.CachedStaticFilesStorage

class storage.CachedStaticFilesStorage CachedStaticFilesStorage is a similar class like the ManifestStaticFilesStorage class but uses Django’s caching framework for storing the hashed names of processed files instead of a static manifest file called staticfiles.json. This is mostly useful for situations in which you don’t have access to the file system. If you want to override certain options of the cache backend the storage uses, simply specify a custom entry in the CACHES setting named 'st

sites.models.Site.name

name A human-readable “verbose” name for the website.

sites.requests.RequestSite.__init__()

__init__(request) Sets the name and domain attributes to the value of get_host().

sites.models.Site.domain

domain The fully qualified domain name associated with the website. For example, www.example.com. Changed in Django 1.9: The domain field was set to be unique.

sites.requests.RequestSite

class requests.RequestSite A class that shares the primary interface of Site (i.e., it has domain and name attributes) but gets its data from a Django HttpRequest object rather than from a database. __init__(request) Sets the name and domain attributes to the value of get_host(). A RequestSite object has a similar interface to a normal Site object, except its __init__() method takes an HttpRequest object. It’s able to deduce the domain and name by looking at the request’s domain. It ha

sites.middleware.CurrentSiteMiddleware

class CurrentSiteMiddleware [source] Adds the site attribute representing the current site to every incoming HttpRequest object. See the sites documentation.

sitemaps.views.index()

views.index(request, sitemaps, template_name='sitemap_index.xml', content_type='application/xml', sitemap_url_name='django.contrib.sitemaps.views.sitemap') The sitemap framework also has the ability to create a sitemap index that references individual sitemap files, one per each section defined in your sitemaps dictionary. The only differences in usage are: You use two views in your URLconf: django.contrib.sitemaps.views.index() and django.contrib.sitemaps.views.sitemap(). The django.contrib

sitemaps.Sitemap.protocol

protocol Optional. This attribute defines the protocol ('http' or 'https') of the URLs in the sitemap. If it isn’t set, the protocol with which the sitemap was requested is used. If the sitemap is built outside the context of a request, the default is 'http'.