Google appengine string replacement in template file
Apart from the argument-less .fetch() call in your code, which I believe can't possibly work (you ALWAYS have to pass fetch an argument -- the max number of entities you're willing to fetch!), I can't reproduce your problem -- assigning a new attribute (including one obtained by processing existing ones) to each item just works fine in my tests.
Can you please reproduce your observed problem in as tiny as compass as possible and edit your question to include all relevant files pls? Seems to be the only way we could help you with your weird observed bug!
BTW, select name,LEFT( description, 50 ) or whatever OF COURSE won't work in GQL -- GQL, very very explicitly, ONLY supports select * to get whole entities, or select __key__ to get just the entities' keys -- that's all; NO selectivity of columns in the select, much less any OPERATIONS on them!-)
I'm using google appengine (python, of course :) ) and I'd like to do a string.replace on a string from the template file.

{% for item in items %}
  <p>{{ item.code.replace( '_', ' ' ) }}</p>
{% endfor %}

But that isn't working.  So we cannot execute anything other than basic checks in the app engine templates.  Is that Correct ?

Another related problem is I'm trying to shorten a string and make it available to the template.
Each furniture object has a name and a longer description field.  In this view I'm rendering, I want only the first 50 characters of the description field.
So I tried something like

items = db.GqlQuery( 'select * from furniture' )

# edit:  if you change the above line to
# items = db.GqlQuery( 'select * from furniture' ).fetch( 1000 )
# the .fetch() command makes the addition of dynamic properties work!

for item in items :
  item.shortdescr = item.description[ 0:50 ]

# pass data off to template for rendering
self.response.out.write(
  template.render( 'furnitureAll.html', { 'items' : items } )
)


Template goes


{% for item in items %}
  <p>{{ item.name }}</p>
  <p>{{ item.shortdescr }}</p>
  <!-- items.shortdescr does not exist here,
  probably because I did not .put() it previously. -->
{% endfor %}

Since that didn't work, I tried changing the Gql Query to shorten the string instead.  But I'm quickly realizing Gql isn't like SQL.  I'm trying to write queries like

select name,LEFT( description, 50 ) from furniture

With little success