It has been a while since I've worked with TurboGears so I'm a little rusty. One simple way to improve it would be to rename the files to logoN.gif, logoE.gif, logoS.gif, then you could consolidate the 7 lines into 3. Alternatively, you could adjust the value of style.style[0] to be N, EP, SA.
<div>
<img src="${tg.config('cccorder.api_url')}/resources/logos/logo${style.style[0]}.gif" alt="Clothing" />
</div>
Hope this helps!