  """
  Provide reverse functions that return fully qualified URLs
  """
  from django.core.urlresolvers import reverse as django_reverse
  from djangorestframework.compat import reverse_lazy as django_reverse_lazy
  
  
  def reverse(viewname, request, *args, **kwargs):
      """
      Do the same as `django.core.urlresolvers.reverse` but using
 
</s> remove     return request.build_absolute_uri(url)
 </s> add     if request:
        return request.build_absolute_uri(url)
    return url </s> remove     Do the same as `django.core.urlresolvers.reverse` but using
    *request* to build a fully qualified URL.
 </s> add     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. </s> remove # reverse_lazy (Django 1.4 onwards)
try:
    from django.core.urlresolvers import reverse_lazy
except:
    from django.core.urlresolvers import reverse
    from django.utils.functional import lazy
    reverse_lazy = lazy(reverse, str)
 </s> add  </s> remove def reverse_lazy(viewname, request, *args, **kwargs):
    """
    Do the same as `django.core.urlresolvers.reverse_lazy` but using
    *request* to build a fully qualified URL.
    """
    url = django_reverse_lazy(viewname, *args, **kwargs)
    return request.build_absolute_uri(url)
 </s> add reverse_lazy = lazy(reverse, str)
from django.utils.functional import lazy
  """
  Provide reverse functions that return fully qualified URLs
  """
  from django.core.urlresolvers import reverse as django_reverse
from django.utils.functional import lazy
  
  
  def reverse(viewname, request, *args, **kwargs):
      """
      Do the same as `django.core.urlresolvers.reverse` but using
keep keep keep keep replace keep keep keep keep keep
 reverse takes request as a kwarg for compatibility with django's reverse 
djangorestframework/reverse.py