The doc for static_url
specifies that you can use a relative path, but I think that may lead to problems at some point (you don't expect your code to stop working after you move some files).
It's easy to add your own method to request, that would be a shortcut. For example :
def CF_static(request, path):
return request.static_url('cistromeprimerscanner:templates/static/%s'%pth)
config.add_request_method(CF_static)
Then, you can write :
${request.CF_static('logo.png')}
add_request_method
is available in pyramid 1.4. If you don't want to use the alpha, you can use set_request_property
instead.