code: def get_url(self, obj):
          
          if not hasattr(obj, 'get_absolute_url') or not obj.get_absolute_url():
              raise ImproperlyConfigured("No URL configured. You must either \
  set a ``get_absolute_url`` method on the %s model or override the %s view's \
  ``get_url`` method" % (obj.__class__.__name__, self.__class__.__name__))
          return obj.get_absolute_url()
docs: The URL at which the detail page should appear.