Message from discussion
with first contruct doesn't compile
Received: by 10.68.125.233 with SMTP id mt9mr270182pbb.5.1334174811492;
Wed, 11 Apr 2012 13:06:51 -0700 (PDT)
X-BeenThere: erlydtl-users@googlegroups.com
Received: by 10.68.243.163 with SMTP id wz3ls5100949pbc.3.gmail; Wed, 11 Apr
2012 13:06:51 -0700 (PDT)
Received: by 10.68.202.168 with SMTP id kj8mr288480pbc.1.1334174811331;
Wed, 11 Apr 2012 13:06:51 -0700 (PDT)
Received: by 10.68.202.168 with SMTP id kj8mr288479pbc.1.1334174811318;
Wed, 11 Apr 2012 13:06:51 -0700 (PDT)
Return-Path: <emmil...@gmail.com>
Received: from mail-pz0-f43.google.com (mail-pz0-f43.google.com [209.85.210.43])
by gmr-mx.google.com with ESMTPS id a5si5227675pbd.0.2012.04.11.13.06.51
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 11 Apr 2012 13:06:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of emmil...@gmail.com designates 209.85.210.43 as permitted sender) client-ip=209.85.210.43;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of emmil...@gmail.com designates 209.85.210.43 as permitted sender) smtp.mail=emmil...@gmail.com; dkim=pass header...@gmail.com
Received: by dadn15 with SMTP id n15so1821970dad.2
for <erlydtl-users@googlegroups.com>; Wed, 11 Apr 2012 13:06:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type:content-transfer-encoding;
bh=6Nq9tNNIB3E1GEFH8ncutzJ8qgpT9VR0E+Xh9YesC8I=;
b=oB73D+dw53aEw94iIt2xUihtpcpyYnWcOVNoEtkun5vZZintccDDsbFHctqdIwT0bn
Kck0n2v7hb7y+iY3iUfqnZYpXHV64SbAe/hs3DkEiNdkn7IkAgtVN1063Sk1kPvWmfiP
in48shJq2bps5r+/beXV8wU7+fvTi/gpLEU+uwk0So2UO9Ry9qLwvYp5//Jis6N/9e+n
xyisTjw+N3uFdnoeX8uM0+A8wk5EWQBcIxtr8oRPH19LyJu2nSSe4/qCY6GOT6FDPZpg
ccAD5/nBSE+rKyHFrqmGOLC9d+JHqEL1kd01Q4R8/8pWx6CKeP0H9Wa4x/ojZbE58sn4
ty2Q==
MIME-Version: 1.0
Received: by 10.68.221.227 with SMTP id qh3mr589433pbc.43.1334174811065; Wed,
11 Apr 2012 13:06:51 -0700 (PDT)
Received: by 10.68.62.41 with HTTP; Wed, 11 Apr 2012 13:06:51 -0700 (PDT)
In-Reply-To: <2182742.630.1334170563335.JavaMail.geo-discussion-forums@vbhc14>
References: <2182742.630.1334170563335.JavaMail.geo-discussion-forums@vbhc14>
Date: Wed, 11 Apr 2012 15:06:51 -0500
Message-ID: <CAP2VJ7_cq2uBSn3kto1BO8n7dH8fFrqUMMgxj-N8eJuWS6e...@mail.gmail.com>
Subject: Re: with first contruct doesn't compile
From: Evan Miller <emmil...@gmail.com>
To: erlydtl-users@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
IIRC the required syntax is
{% with img=3Drestaurant.restaurant_images|first %}
...
{% endwith %}
On Wed, Apr 11, 2012 at 1:56 PM, Ward (TTY) <wardbek...@gmail.com> wrote:
> The following template:
>
> {% with restaurant.restaurant_images|first as img %}
> <img src=3D"/restaurant_image/{{ img.filekey }}/200x200" title=3D"{{ img.=
caption
> }}" />
> {% endwith %}
>
> failes with:
>
> ERROR: Compiling template templates/test.dtl failed:
> =A0 {error,{"templates/test.dtl",
> =A0 =A0 =A0 =A0 =A0 [{{1,19},erlydtl_parser,["syntax error before: ","'.'=
"]}]}}
>
> This seems to be valid in django templates though:=A0example
>
> How to make this work?
>
--=20
Evan Miller
http://www.evanmiller.org/