  from __future__ import unicode_literals, absolute_import
  from django import template
  from django.core.urlresolvers import reverse
  from django.http import QueryDict
  from django.utils.html import escape
  from django.utils.safestring import SafeData, mark_safe
 
</s> remove from django.core.exceptions import ObjectDoesNotExist, ValidationError
 </s> add from django.core.exceptions import ObjectDoesNotExist, ValidationError, NoReverseMatch </s> remove     except:  # Django 1.3
 </s> add     except ImportError:  # Django 1.3 </s> remove except:
 </s> add except ImportError: </s> remove except:
 </s> add except ImportError: </s> remove except:
 </s> add except ImportError:
from django.core.exceptions import NoReverseMatch
  from __future__ import unicode_literals, absolute_import
  from django import template
from django.core.exceptions import NoReverseMatch
  from django.core.urlresolvers import reverse
  from django.http import QueryDict
  from django.utils.html import escape
  from django.utils.safestring import SafeData, mark_safe
keep add keep keep keep keep
 Purge naked excepts.

Most of these had obvious exceptions which would be thrown. Some I'm not
sure about but they should at least catch only Exception so as not to
ignore SystemExit and other inappropriate Error classes. 
rest_framework/templatetags/rest_framework.py