Setting the language attribute in a design document

6 views
Skip to first unread message

Rich K

unread,
Apr 30, 2010, 12:06:39 AM4/30/10
to CouchApp
When using a python view server, what is the best way to set the
language attribute in a design document using couchapp?

Here is what I tried:

I created a new couchapp and a couple python views. Then I did the
following:

cd new_couchapp
echo "python" > language

When I push the couchapp to the server and look at the design document
using futon, I see a "language" attribute in the design document, but
the value appears spread over two lines:

"python
"

If I manually correct the value of the language attribute to appear as
"python" from within futon, then my views work. Otherwise my views do
not work. As far as I can tell, my "language" file only contains one
line, and no newline or linefeed characters.

I am using couchdb 0.11 and couchapp 0.5.3-dev.

Thanks,

Rich

--
You received this message because you are subscribed to the Google Groups "CouchApp" group.
To post to this group, send email to couc...@googlegroups.com.
To unsubscribe from this group, send email to couchapp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/couchapp?hl=en.

Benoit Chesneau

unread,
Apr 30, 2010, 12:46:00 AM4/30/10
to CouchApp


On Apr 30, 6:06 am, Rich K <rich.krau...@gmail.com> wrote:
> When using a python view server, what is the best way to set the
> language attribute in a design document using couchapp?
>
> Here is what I tried:
>
> I created a new couchapp  and a couple python views.  Then I did the
> following:
>
> cd new_couchapp
> echo "python" > language
>
> When I push the couchapp to the server and look at the design document
> using futon, I see a "language" attribute in the design document, but
> the value appears spread over two lines:
>
> "python
> "
>
> If I manually correct the value of the language attribute to appear as
> "python" from within futon, then my views work.  Otherwise my views do
> not work.  As far as I can tell, my "language" file only contains one
> line, and no newline or linefeed characters.
>
> I am using couchdb 0.11 and couchapp 0.5.3-dev.
>
> Thanks,
>
> Rich
>
I think `echo` create a line ending. For now best way is to use an
editor to create this langage file or make sure there isn't a line
ending. I will fix it asap.

- benoit

Ryan Graham

unread,
Apr 30, 2010, 12:46:52 AM4/30/10
to couc...@googlegroups.com
On Thu, Apr 29, 2010 at 9:06 PM, Rich K <rich.k...@gmail.com> wrote:
> cd new_couchapp
> echo "python" > language
>
> When I push the couchapp to the server and look at the design document
> using futon, I see a "language" attribute in the design document, but
> the value appears spread over two lines:

echo -n "python" > language

~Ryan
--
http://twitter.com/rmgraham/
http://careers.stackoverflow.com/rmgraham

Rich Krauter

unread,
Apr 30, 2010, 1:17:59 AM4/30/10
to couc...@googlegroups.com
On Fri, Apr 30, 2010 at 12:46 AM, Ryan Graham <r.m.g...@gmail.com> wrote:
> On Thu, Apr 29, 2010 at 9:06 PM, Rich K <rich.k...@gmail.com> wrote:
>> cd new_couchapp
>> echo "python" > language
>>
>> When I push the couchapp to the server and look at the design document
>> using futon, I see a "language" attribute in the design document, but
>> the value appears spread over two lines:

>
> echo -n "python" > language
>
> ~Ryan

> --
> I think `echo` create a line ending. For now best way is to use an
> editor to create this langage file or make sure there isn't a line
> ending. I will fix it asap.
>
> - benoit

Benoit and Ryan,

Thank you for the help!

Rich
Reply all
Reply to author
Forward
0 new messages