Beispiel #1
0
def urlcheck(request):
    url = request.POST.get("long_url", None)
    if not url:
        return { "valid": False }
    status = test_url(get_destination_url(url))
    if status["status_current"]:
        return { "valid": True }
    return { "valid": False }
Beispiel #2
0
 def get_destination_url(self):
     return get_destination_url(self.destination_url)