Message from discussion
custom view params
Received: by 10.50.6.167 with SMTP id c7mr2240833iga.1.1336313942785;
Sun, 06 May 2012 07:19:02 -0700 (PDT)
X-BeenThere: pylons-discuss@googlegroups.com
Received: by 10.231.2.164 with SMTP id 36ls287865ibj.5.gmail; Sun, 06 May 2012
07:18:57 -0700 (PDT)
Received: by 10.50.46.162 with SMTP id w2mr1071249igm.4.1336313937706;
Sun, 06 May 2012 07:18:57 -0700 (PDT)
Received: by 10.50.46.162 with SMTP id w2mr1071248igm.4.1336313937692;
Sun, 06 May 2012 07:18:57 -0700 (PDT)
Return-Path: <eric.lemo...@camptocamp.com>
Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172])
by gmr-mx.google.com with ESMTPS id eo1si1533269igc.0.2012.05.06.07.18.57
(version=TLSv1/SSLv3 cipher=OTHER);
Sun, 06 May 2012 07:18:57 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.214.172 is neither permitted nor denied by best guess record for domain of eric.lemo...@camptocamp.com) client-ip=209.85.214.172;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.214.172 is neither permitted nor denied by best guess record for domain of eric.lemo...@camptocamp.com) smtp.mail=eric.lemo...@camptocamp.com
Received: by mail-ob0-f172.google.com with SMTP id eh20so8202384obb.31
for <pylons-discuss@googlegroups.com>; Sun, 06 May 2012 07:18:57 -0700 (PDT)
d=google.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type
:x-gm-message-state;
bh=xRp4MVrk1UTQc4P4pNC5vTGCdCCoPlLyVSifWellrks=;
b=PpTdhQeJFyZl09LwRThQqWglALOCo45VpGAvtBsXkMX66Sl8kKXB5LwF66qe8MAa1j
XGeie0+pRoI+1u3nOfmpfzDS6cFKP3z3WAm6yOxkO7iUvGM5azYHa8M21nnfsaboCiQr
VSOS7ccv1AIRUao2JoRmMDXMm/j35DsUXDMZvIxzkWKmzH8Nm65gghhlLcxwarEc9k5h
kbb4yYL8Ev05MOS6vzL6C5ODCLqmlNZbLeo++7M8vvKQr/6fk29wPNpnSUDi9TJirQMY
qQhQzaM0bIc/ahO2Bi0bcEgItA5bvt6o7WDRBuYQZNPKGjcvj6o6l4Irc2pT33lJvjoR
m7Mg==
MIME-Version: 1.0
Received: by 10.182.117.98 with SMTP id kd2mr17537816obb.4.1336313936920; Sun,
06 May 2012 07:18:56 -0700 (PDT)
Received: by 10.60.17.73 with HTTP; Sun, 6 May 2012 07:18:56 -0700 (PDT)
Date: Sun, 6 May 2012 16:18:56 +0200
Message-ID: <CAGZ3h-FQS191LsTKU_fZ172yUgbWLP3OGCZt1zLL=goEiYN...@mail.gmail.com>
Subject: custom view params
From: Eric Lemoine <eric.lemo...@camptocamp.com>
To: "pylons-discuss@googlegroups.com" <pylons-discuss@googlegroups.com>
Content-Type: multipart/alternative; boundary=f46d044784b984c23204bf5ed54b
X-Gm-Message-State: ALoCoQmzUFv7dVrYcJPbFovnWBnIdgLfhXkCcnsJYxkQ9njfa1nG2BWfC3XidsELnQGK/S/RwaJQ
--f46d044784b984c23204bf5ed54b
Content-Type: text/plain; charset=ISO-8859-1
Hi
I'd like to be able to set custom config parameters in my views, and read
these parameters from request objects. Is this at all possible?
For example:
@view_config(route_name='a_route', renderer='a_renderer',
custom_param='some_value')
def v(request)
return {}
Thanks.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
--f46d044784b984c23204bf5ed54b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi<div><br></div><div>I'd like to be able to set custom config paramete=
rs in my views, and read these parameters from request objects. Is this at =
all possible?</div><div><br></div>For example:<br><div><br></div><div>@view=
_config(route_name=3D'a_route', renderer=3D'a_renderer', cu=
stom_param=3D'some_value')</div>
<div>def v(request)</div><div>=A0 =A0 =A0return {}</div><div><br></div><spa=
n></span><div><br></div><div>Thanks.</div><br><br>-- <br>Eric Lemoine<br><b=
r>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du =
Lac, Cedex<br>
<br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href=3D"mailto:eric.lemoine@camp=
tocamp.com">eric.lemo...@camptocamp.com</a><br><a href=3D"http://www.campto=
camp.com">http://www.camptocamp.com</a><br><br>
--f46d044784b984c23204bf5ed54b--