Example #1
0
def system_information(request):
	return render_to_response('core/system_information.html', {
			'server': uname()[1],
			'behind_cache': is_behind_cache(request),
			'cache_server': is_behind_cache(request) and request.META['REMOTE_ADDR'] or None,
			'client_ip': get_client_ip(request),
	})
Example #2
0
def system_information(request):
    return render_to_response(
        "core/system_information.html",
        {
            "server": os.uname()[1],
            "behind_cache": is_behind_cache(request),
            "cache_server": is_behind_cache(request) and request.META["REMOTE_ADDR"] or None,
            "client_ip": get_client_ip(request),
        },
    )
Example #3
0
def robots(request):
	if not is_behind_cache(request):
		# If we're not serving this through one of our Varnish caches, we allow *nothing* to be indexed
		return HttpResponse("User-agent: *\nDisallow: /\n", mimetype='text/plain')
	else:
		# Regular website
		return HttpResponse("""User-agent: *
Disallow: /admin/
Disallow: /account/

Sitemap: http://www.postgresql.org/sitemap.xml
""", mimetype='text/plain')