Try request.static_path(…)
e.g. <link rel="stylesheet"
href="${request.static_path('app:static/css/settings/globals.css')}"/>
HTH,
Kamal
> On Nov 1, 2017, at 4:03 PM, Andrew Burnett <[email protected]> wrote:
>
> I'm trying to serve some static css, png's, etc. from my Pyramid app that's
> hosted on Elastic Beanstalk. It works fine on my local machine but when I try
> to run on EB, neither the CSS nor the images are found. Here's the relevant
> code:
>
>
>
> From .ebextensions:
>
>
>
> option_settings:
> aws:elasticbeanstalk:container:python:
> WSGIPath: pyramid.wsgi
> aws:elasticbeanstalk:application:
> Application Healthcheck URL: /health
> aws:elasticbeanstalk:container:python:staticfiles:
> "/static/": "static/"
>
>
> From home.make
>
>
>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/settings/globals.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/settings/colors.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/objects/containers.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/base/base.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/articles.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/divs.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/footers.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/headers.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/img.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/links.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/lists.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/paragraphs.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/sections.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/components/small.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/state/links.css')}"/>
> <link rel="stylesheet"
> href="${request.static_url('app:static/css/utilities/utilities.css')}"/>
>
>
> From static_config.py
>
>
>
> from pyramid.security import NO_PERMISSION_REQUIRED
>
> ### INCLUDEME
>
> def includeme(config):
> """Configure static endpoints.
> """
> config.add_static_view(name='static',\
> path='app:static')
>
> --
> 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 post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/b9be3daf-93cf-49c9-9ffd-f67d43e8289d%40googlegroups.com
>
> <https://groups.google.com/d/msgid/pylons-discuss/b9be3daf-93cf-49c9-9ffd-f67d43e8289d%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/B7FACFFF-241B-4D5D-B2E4-7F943669567A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.