Why is my Django loading raw css into my html files?

70 Views Asked by At

I have a Django project which has been set us using django-pipeline and django-compress. The code on github is pretty standard ex:

{% extends "base.html" %}
{% load static from staticfiles %}

{% block extra_head %}
<meta name="description" content="Company Desc">
<meta name="keywords" content="kw1, kw2, kw3, kw4">
<meta property='og:title' content='Company title'/>
<meta property='og:image' content="{% static 'images/image.png' %}"/>
<meta property='og:description' content='our motto'/>
<meta property='og:url' content='https://www.company.com' />
{% endblock extra_head %}

But when I clone the code from github and open it in sublime or pycharm style is injected into my html head for some reason and I cant figure out why. We are using Django 1.4, django-pipeline, django-compressor.

{% extends "base.html" %}
{% load static from staticfiles %}

{% block extra_head %}
<meta name="description" content="Company Desc">
<meta name="keywords" content="kw1, kw2, kw3, kw4">
<meta property='og:title' content='Company title'/>
<meta property='og:image' content="{% static 'images/image.png' %}"/>
<meta property='og:description' content='our motto'/>
<meta property='og:url' content='https://www.company.com' />
<style>
 //30 lines of compressed css.
</style>
{% endblock extra_head %}

Anyone know the cause of css being injected into the .html text file?

0

There are 0 best solutions below