add_static_view accepts a fully-qualified URL as the first argument. https://docs.pylonsproject.org/projects/pyramid/en/latest/api/config.html#pyramid.config.Configurator.add_static_view
However for files that are not in your repo/package, I would suggest you not use add_static_view. Instead create an external route to generate URLs that you add into your templates. https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/urldispatch.html#external-routes This is a kind of hand-wavy suggestion. I'm sure someone else who uses a CDN in their app has more details or a better technique. --steve On 7/20/20 5:33 PM, Matt Bodman wrote: > Hi, I need help troubleshooting something. I currently host my static files > within my Pyramid repo, but I want to add more files and host them on S3. I > have tried just about every permutation of the static view config I can think > of, but just can't get it to work. > > If the sub url is `/static` and the files are hosted at `http://bla.s3`, what > do I pass the `add_static_view` method? > > Any clues would be appreciated! > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/a8c48aa8-871e-4aa8-bd39-86762ec2a748n%40googlegroups.com > > <https://groups.google.com/d/msgid/pylons-discuss/a8c48aa8-871e-4aa8-bd39-86762ec2a748n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/b3ff6472-4057-1337-5273-d4f01d53d503%40gmail.com.
