In my html template I load external files like this for stylesheet, javascript, etc:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
Unfortunally sometimes I have to code off-line so I could load the files like this:
<link href="{% static 'css/bootstrap.min.css' %}" rel='stylesheet'>
Is it possible to check the internet connection and choose which line to read (the first one if there is the connection, the second one if not)?