you can surround the for loops with an if statement if any of your lists are empty.
For example,
{% if technology_list %}
{% for technology in technology_list %} {{ technology.technology }} {% endfor %}
{% endif %}
Lastly, in the view, you can check to see the posted item is in the request dictionary.
if 'technology' in request.POST:
tech = request.POST['technology']
-----Update-----
First off, you should probably be using django forms to do this. Secondly, you should be using stackoverflow to ask specific questions. You shouldn't be using it as a method to fix your code.
Lastly, the error seems to be thrown for the following line:
pathology_id = request.GET['pathology_id']
The problem is that the key 'pathology_id' isn't inside the GET dictionary. If you have a default value for this field, you can do something like this:
pathology_id = 'default_value'
if 'pathology_id' in request.GET:
pathology_id = request.GET['pathology_id']
Otherwise, if you don't have a default value, you obviously can't get an Pathology object without an ID. You will then have to handle the case when nothing is selected.
if 'pathology_id' in request.GET:
pathology_id = request.GET['pathology_id']
#rest of your code
else:
#code when no pathology_id is selected