Returns a response of an individual entry, for the given slug.
353364
def entry_detail(request, slug, template='djournal/entry_detail.html'):
    ''''''

    entry = get_object_or_404(Entry.public, slug=slug)

    context = {
        'entry': entry,
    }

    return render_to_response(
        template,
        context,
        context_instance=RequestContext(request),
    )
320899
def make_response(obj):
    """"""
    if obj is None:
        raise TypeError("Handler return value cannot be None.")
    if isinstance(obj, Response):
        return obj
    return Response(200, body=obj)
1268213
def get(self):
        
        self._log.debug('Converting Response object to string format')
        response = ''.join(map(str, self._response)).strip()

        self._log.debug('Resetting parent Trigger temporary containers')
        self.stars = {
            'normalized': (),
            'case_preserved': (),
            'raw': ()
        }
        user = self.trigger.user
        self.trigger.user = None

        if self.redirect:
            self._log.info('Redirecting response to: {msg}'.format(msg=response))
            groups = self.agentml.request_log.most_recent().groups
            response = self.agentml.get_reply(user.id, response, groups)
            if not response:
                self._log.info('Failed to retrieve a valid response when redirecting')
                return ''

        return response
1215715
def _process_for_id(cls, response_raw):
        

        json = response_raw.body_bytes.decode()
        obj = converter.json_to_class(dict, json)
        id_ = converter.deserialize(
            Id,
            cls._unwrap_response_single(obj, cls._FIELD_ID)
        )

        return client.BunqResponse(id_.id_, response_raw.headers)
56487
def get(self, request, *args, **kwargs):
        
        entry = self.get_object()
        return HttpResponsePermanentRedirect(entry.get_absolute_url())
1030120
def process_request(self, request_object):
        """"""

        identifier = request_object.identifier

        # Look for the object by its ID and return it
        resource = request_object.entity_cls.get(identifier)
        return ResponseSuccess(Status.SUCCESS, resource)
366779
protected function _get($slug = '')
    {
        // Build a url from the slug that was passed in
        $url = $this->urlFromRoute($slug);
        // Send a post request to the API
        $response = $this->orm->uniRequest->get($url, $this->orm->headers);
        // If the token has expired
        if ($response->code == 401) {
            if (isset($response->body->message)) {
                if ($response->body->message == 'Token has expired') {
                    // Authenticate again
                    $this->orm->authenticate();
                    // Try the request again
                    return $this->_get($slug);
                }
            }
            // Return the response
            return $response;
        } else {
            // Return the response
            return $response;
        }
    }
577157
def get_object(self, request, year, month, day, slug):
        
        return get_object_or_404(Entry, slug=slug,
                                 publication_date__year=year,
                                 publication_date__month=month,
                                 publication_date__day=day)
1168149
def process_response(self, req, resp, resource):
        
        if 'result' not in req.context:
            return
        req.context['result']['is_login'] = 'user_id' in req.env['session']
        if settings.DEBUG:
            req.context['result']['_debug_queries'] = sys._debug_db_queries
            sys._debug_db_queries = []
        if resp.body is None and req.context['result']:
            resp.body = json.dumps(req.context['result'])

        try:
            log.debug("RESPONSE: %s" % resp.body)
        except:
            log.exception("ERR: RESPONSE CANT BE LOGGED ")
1296238
def get_response(url, referer = nil)
      full_path = url.query.nil? ? url.path : "#{url.path}?#{url.query}"

      opts = {}
      opts['User-Agent'] = user_agent if user_agent
      opts['Referer'] = referer.to_s if referer
      opts['Cookie']  = ::HTTP::Cookie.cookie_value(cookie_jar.cookies(url)) if accept_cookies?
      opts['Accept-Encoding'] = 'gzip,deflate'

      retries = 0
      begin
        start = Time.now
        # format request
        req = Net::HTTP::Get.new(full_path, opts)
        # HTTP Basic authentication
        req.basic_auth url.user, url.password if url.user
        if @opts[:http_user]
          req.basic_auth @opts[:http_user], @opts[:http_password]
        end
        # urls auth schema has higher priority
        req.basic_auth url.user, url.password if url.user
        response = connection(url).request(req)
        finish = Time.now
        response_time = ((finish - start) * 1000).round
        cookie_jar.parse(response['Set-Cookie'], url) if accept_cookies? && response['Set-Cookie']
        return response, response_time
      rescue *RESCUABLE_ERRORS => e
        puts e.inspect if verbose?
        refresh_connection(url)
        retries += 1
        if retries < 3
          retry
        else
          raise e
        end
      end
    end
814960
public function entries($slug)
    {
        // AUTHORIZE ... COMES HERE
        $form = $this->form->getBySlug($slug);
        $entries = $this->formEntry->getBySlug($slug);
        return view('chuckcms::backend.forms.entries', compact('form', 'entries'));
    }
26088
def service(request, slug):
    ""
    
    try:
        service = Service.objects.get(slug=slug)
    except Service.DoesNotExist:
        return HttpResponseRedirect(reverse('overseer:index'))
        
    event_list = service.event_set.order_by('-date_created')
    
    return respond('overseer/service.html', {
        'service': service,
        'event_list': event_list,
    }, request)
123349
def process_response(self, request, response):
        
        if hasattr(threadlocal, 'auditlog'):
            pre_save.disconnect(sender=LogEntry, dispatch_uid=threadlocal.auditlog['signal_duid'])

        return response
591857
def process_response(self, request, response):
        """"""
        batcher = PrioritizedBatcher.global_instance()
        if batcher.is_started:
            # May not be started due to strange middleware behavior on first request.
            batcher.commit()

        return response
264395
function processResponse(obj) {
	for (var m in obj.nitro.results.items) {
		var mb = obj.nitro.results.items[m];
		//if (mb.partner != 's0000001') {
		console.log(mb.mid+','+mb.url_key+','+(mb.title ? mb.title : mb.name)+','+mb.partner);
		//}
	}
	var dest = {};
	if ((obj.nitro.pagination) && (obj.nitro.pagination.next)) {
		dest.query = nitro.queryFrom(obj.nitro.pagination.next.href,true);
		dest.path = path;
		dest.callback = processResponse;
	}
	nitro.setReturn(dest);
	return true;
}
189605
def get_content_slug_by_slug(self, slug):
        
        content = self.filter(type='slug', body=slug)
        if settings.PAGE_USE_SITE_ID:
            content = content.filter(page__sites__id=global_settings.SITE_ID)
        try:
            content = content.latest('creation_date')
        except self.model.DoesNotExist:
            return None
        else:
            return content
1176090
def response(self, url):
        """"""
        
        resp = requests.get(url).content
        return self.parseresponse(resp)