Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion showing an image attachment in a Django template

Received: by 10.224.17.211 with SMTP id t19mr143795qaa.16.1305309701525;
        Fri, 13 May 2011 11:01:41 -0700 (PDT)
X-BeenThere: couchdb-python@googlegroups.com
Received: by 10.224.138.148 with SMTP id a20ls528388qau.5.gmail; Fri, 13 May
 2011 11:01:41 -0700 (PDT)
Received: by 10.224.27.137 with SMTP id i9mr286532qac.43.1305309701183;
        Fri, 13 May 2011 11:01:41 -0700 (PDT)
Date: Fri, 13 May 2011 11:01:36 -0700 (PDT)
From: Kxepal <kxe...@gmail.com>
Reply-To: couchdb-python@googlegroups.com
To: couchdb-python@googlegroups.com
Message-ID: <12534597.3118.1305309696871.JavaMail.geo-discussion-forums@vbji14>
In-Reply-To: <e3d9def2-5144-4e98-a77b-0ea2d64475f4@m10g2000yqd.googlegroups.com>
Subject: Re: showing an image attachment in a Django template
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_3116_23220005.1305309696870"

------=_Part_3116_23220005.1305309696870
Content-Type: multipart/alternative; 
	boundary="----=_Part_3117_20588197.1305309696870"

------=_Part_3117_20588197.1305309696870
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Friday, May 13, 2011 9:54:59 PM UTC+4, rossdavidh wrote:
>
> I got really excited about this: 
> image_url = docs(id)('dog.jpg').url 
>

you have missed `.resource` attribute access as I previously wrote:

> db.resource(docid)(filename).url
> and you would get full url to your filename that has been attached to 
docid within db.


------=_Part_3117_20588197.1305309696870
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Friday, May 13, 2011 9:54:59 PM UTC+4, rossdavidh wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I got really excited about this:
<br>image_url = docs(id)('dog.jpg').url
<br></blockquote><div><br>you have missed `.resource` attribute access as I previously wrote:<br><br>&gt; db.resource(docid)(filename).url<br><div>&gt; and you would get full url to your filename that has been attached to docid within db.</div><br></div>
------=_Part_3117_20588197.1305309696870--

------=_Part_3116_23220005.1305309696870--