﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26079	add prefered/default protocol in the sites framework	Eric	nobody	"I think adding a prefered/default protocol in the sites framework would be a great addition for generating full url's to django websites.  

specially when generating url from action not coming from a request like the sitemaps [https://github.com/django/django/blob/master/django/contrib/sitemaps/__init__.py#L42 ping_google] that assumes the protocol to be http:
{{{
    current_site = Site.objects.get_current()
    url = ""http://%s%s"" % (current_site.domain, sitemap_url)
}}}
so we could have something like this instead:
{{{
    current_site = Site.objects.get_current()
    url = ""%s://%s%s"" % (current_site.protocol, current_site.domain, sitemap_url)
}}}
and maybe even add a shortcut for the site's base url
"	New feature	new	contrib.sites	dev	Normal		sites protocol		Unreviewed	0	0	0	0	0	0
