-1

I'm working in Django 1.8, OSX, and Chrome. Some ionicons I've included in a rendered template are not showing up in Heroku (staging environment). I'm fairly certain that I have linked/included the icons properly in the css and font files (30464569), because they show up just fine on the localhost, on cPanel, and when published on the person's own website. Additionally, they even show up on Heroku if I use Safari! What is happening here?

I've read a bunch of SO posts about this, but most people are referencing other font packages (29687388) or (14366158), other frameworks (25982037) or (21472458), or completely missing icons (27766015).

EDITED TO INCLUDE HTML (from Django template)

  <head>
    <meta charset="UTF-8">
    <title>{{ student.preferred_name }} {{ student.last_name }}</title>
    <!--<meta name="description" content="[Insert your description here]">-->
    <!--<meta name="google-site-verification" content="">-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="{% asset 'vendors/css/normalize.css' %}">
    <link rel="stylesheet" type="text/css" href="{% asset 'vendors/css/grid.css' %}">
    <link rel="stylesheet" type="text/css" href="{% asset 'vendors/css/owl.carousel.min.css' %}">
    <link rel="stylesheet" type="text/css" href="{% asset 'vendors/css/owl.theme.default.min.css' %}">
    <link rel="stylesheet" type="text/css" href="{% asset 'vendors/css/ionicons.min.css' %}">
    <link rel="stylesheet" type="text/css" href="{% asset 'resources/css/queries.css' %}">
    <link rel="stylesheet" type="text/css" href="{% asset 'resources/css/style.css' %}">
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Lato:400,100,300,300italic">
  </head>

I'm hesitant to post code because it's not a public project, but here are are two images showing the issue:

Icons on LocalHost

Icons on Heroku

Any ideas on how I can fix this? I need my users to see an accurate preview before they publish their site and this icon issue has been a major headache for over a week.

Thanks! Sarah

Community
  • 1
  • 1
  • Please post the relevant portions from your HTML template, specifically the part where you link the CSS file. – Selcuk Apr 20 '16 at 02:20

2 Answers2

0

Be sure that run command $python manage.py collectstatic before pushing to heroku.

pptonio
  • 1
  • 3
  • Yeah, I've done that. The issue isn't that the files aren't there. The issue is that in staging, only when viewed in Chrome, they aren't showing. – knittingarch Apr 22 '16 at 15:24
0

I had this same problem confirm that the static assets are correctly spelled Note that it might not be case sensitive on windows but Linus is case sensitive and Heroku runs on Linus so ensure that your lower and upper cases are in place