Just something I discovered when working on a project: Pyramid tries to link content as HTTP, not HTTPS unless you have the following enabled in your .ini files:
[server:main]
use = egg:waitress#main
listen = *:8080
url_scheme = https <----
Once you add that option, it all starts working the right way.