  from django.core.urlresolvers import reverse as django_reverse
  from django.utils.functional import lazy
  
  
  def reverse(viewname, *args, **kwargs):
      """
      Same as `django.core.urlresolvers.reverse`, but optionally takes a request
      and returns a fully qualified URL, using the request to get the base URL.
      """
      request = kwargs.pop('request', None)
 
</s> remove     request = kwargs.pop('request', None)
    url = django_reverse(viewname, *args, **kwargs)
 </s> add     if format is not None:
        kwargs = kwargs or {}
        kwargs['format'] = format
    url = django_reverse(viewname, args=args, kwargs=kwargs, **extra) </s> remove             raise exceptions.InvalidFormat(format)
 </s> add             raise Http404
def reverse(viewname, args=None, kwargs=None, request=None, format=None, **extra):
  from django.core.urlresolvers import reverse as django_reverse
  from django.utils.functional import lazy
  
  
def reverse(viewname, args=None, kwargs=None, request=None, format=None, **extra):
      """
      Same as `django.core.urlresolvers.reverse`, but optionally takes a request
      and returns a fully qualified URL, using the request to get the base URL.
      """
      request = kwargs.pop('request', None)
keep keep keep keep replace keep keep keep keep keep
 Fixes for urls with suffixes 
rest_framework/reverse.py