def open_link(url, name_of_link):
  try:
    # If possible, open in a new tab, and raise the window to the front
    webbrowser.open(url, new=2, autoraise=True)
    return True
  except webbrowser.Error:
    sys.stderr.write("\t" + name_of_link + " failed to open.\n")
    return False
A non-existent flatpage raises 404 when served through a view, even when the middleware is in use
dataset/ETHPy150Open google/fplutil/setuputil/util.py/open_link--crossover with--dataset/ETHPy150Open django/django/tests/flatpages_tests/test_csrf.py/FlatpageCSRFTests.test_view_non_existent_flatpage