code: def simple_getter(queryset, object_regex=None, lookup_field=None):
      ''' Returns simple object_getter function for use with PluggableSite.
      It takes 'queryset' with QuerySet or Model instance, 'object_regex' with
      url regex and 'lookup_field' with lookup field.
      '''
      object_regex = object_regex or r'\d+'
      lookup_field = lookup_field or 'pk'
  
      if isinstance(queryset, models.Model):
          qs = queryset._default_manager.all()
      elif isinstance(queryset, QuerySet) or isinstance(queryset, models.Manager):
          qs = queryset
  
      def object_getter(object_id):
          return qs.get(**{lookup_field: object_id})
      object_getter.regex = "(?P<object_id>%s)" % object_regex
  
      return object_gettef simple_getter(queryset, object_regex=None, lookup_field=None):
      ''' Returns simple object_getter function for use with PluggableSite.
      It takes 'queryset' with QuerySet or Model instance, 'object_regex' with
      url regex and 'lookup_field' with lookup field.
      '''
      object_regex = object_regex or r'\d+'
      lookup_field = lookup_field or 'pk'
  
      if isinstance(queryset, models.Model):
          qs = queryset._default_manager.all()
      elif isinstance(queryset, QuerySet) or isinstance(queryset, models.Manager):
          qs = queryset
  
      def object_getter(object_id):
          return qs.get(**{lookup_field: object_id})
      object_getter.regex = "(?P<object_id>%s)" % object_regex
  
      return object_getter
docs: Returns simple object_getter function for use with PluggableSite.
      It takes 'queryset' with QuerySet or Model instance, 'object_regex' with
      url regex and 'lookup_field' with lookup field.