ungleich-no-ipv4-here/no_ipv4_here/views.py

14 lines
389 B
Python
Raw Normal View History

2019-01-27 13:26:29 +00:00
from django.contrib.sites.shortcuts import get_current_site
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse(
"""Sorry, (this part of) domain {domain} is not reachable by IPv4.
Please upgrade to IPv6 and try to reach {domain} again.""".format(
domain=get_current_site(request).domain
)
)