Similarly load CSS via Django staticfiles app

This commit is contained in:
Ben Sturmfels 2024-02-27 09:34:11 +11:00
parent caa0ff7b86
commit 18de3adfce
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
9 changed files with 15 additions and 12 deletions

View file

@ -1,9 +1,10 @@
{% extends "base_conservancy.html" %} {% extends "base_conservancy.html" %}
{% load cache %} {% load cache %}
{% load humanize %} {% load humanize %}
{% load static %}
{% block category %}WhatWeDo{% endblock %} {% block category %}WhatWeDo{% endblock %}
{% block head %} {% block head %}
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %} {% endblock %}

View file

@ -1,9 +1,10 @@
{% extends "base_conservancy.html" %} {% extends "base_conservancy.html" %}
{% load static %}
{% block subtitle %}Attend Supporter Night - {% endblock %} {% block subtitle %}Attend Supporter Night - {% endblock %}
{% block category %}supporter{% endblock %} {% block category %}supporter{% endblock %}
{% block head %} {% block head %}
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View file

@ -6,7 +6,7 @@
{% block head %} {% block head %}
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script> <script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script>
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View file

@ -2,8 +2,9 @@
{% block category %}WhatWeDo{% endblock %} {% block category %}WhatWeDo{% endblock %}
{% load cache %} {% load cache %}
{% load humanize %} {% load humanize %}
{% load static %}
{% block head %} {% block head %}
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %} {% endblock %}

View file

@ -12,9 +12,9 @@
<meta name="description" content="The Software Freedom Conservancy provides a non-profit home and services to Free, Libre and Open Source Software (FLOSS) projects." /> <meta name="description" content="The Software Freedom Conservancy provides a non-profit home and services to Free, Libre and Open Source Software (FLOSS) projects." />
<meta name="keywords" content="software, freedom, conservancy, open source, gnu, GNU, Open Source, Free and Open Source, Free and Open Source Software, FLOSS, FOSS, protect, protection, help, policy, linux, non-profit" /> <meta name="keywords" content="software, freedom, conservancy, open source, gnu, GNU, Open Source, Free and Open Source, Free and Open Source Software, FLOSS, FOSS, protect, protection, help, policy, linux, non-profit" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="/css/tachyons.css"/> <link rel="stylesheet" type="text/css" href="{% static 'css/tachyons.css' %}"/>
<link rel="stylesheet" type="text/css" media="screen" href="/css/conservancy.css" /> <link rel="stylesheet" type="text/css" media="screen" href="{% static 'css/conservancy.css' %}" />
<link rel="stylesheet" type="text/css" media="(min-width: 67em)" href="/css/conservancy-bigscreen.css" /> <link rel="stylesheet" type="text/css" media="(min-width: 67em)" href="{% static 'css/conservancy-bigscreen.css' %}" />
<script type="text/javascript" src="{% static 'js/jquery-1.7.2.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery-1.7.2.js' %}"></script>
<script type="text/javascript" src="{% static 'js/conservancy.js' %}"></script> <script type="text/javascript" src="{% static 'js/conservancy.js' %}"></script>
{% block head %}{% endblock %} {% block head %}{% endblock %}

View file

@ -1,9 +1,10 @@
{% extends "base_conservancy.html" %} {% extends "base_conservancy.html" %}
{% load cache %} {% load cache %}
{% load humanize %} {% load humanize %}
{% load static %}
{% block category %}News{% endblock %} {% block category %}News{% endblock %}
{% block head %} {% block head %}
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %} {% endblock %}

View file

@ -1,9 +1,10 @@
{% extends "base_conservancy.html" %} {% extends "base_conservancy.html" %}
{% load cache %} {% load cache %}
{% load humanize %} {% load humanize %}
{% load static %}
{% block category %}Vizio{% endblock %} {% block category %}Vizio{% endblock %}
{% block head %} {% block head %}
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %} {% endblock %}

View file

@ -5,7 +5,7 @@
{% block head %} {% block head %}
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script> <script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script>
<link href="/css/forms.css" rel="stylesheet" type="text/css"/> <link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
{% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today&rsquo;s most pressing social issues, but it&rsquo;s only effective when FOSS is for everyone. Support Conservancy today to help make that happen!" %} {% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today&rsquo;s most pressing social issues, but it&rsquo;s only effective when FOSS is for everyone. Support Conservancy today to help make that happen!" %}
{% include "opengraph_urllist_partial.html" with property='image' urls='' fallback='/img/conservancy-logo.png' %} {% include "opengraph_urllist_partial.html" with property='image' urls='' fallback='/img/conservancy-logo.png' %}
{% endblock %} {% endblock %}

View file

@ -29,9 +29,7 @@ admin.autodiscover()
urlpatterns = [ urlpatterns = [
# Uncomment these 3 lines when testing locally to get static content # Uncomment these 3 lines when testing locally to get static content
url(r'^css', static_views.index),
url(r'^img', static_views.index), url(r'^img', static_views.index),
url(r'^js', static_views.index),
url(r'^$', frontpage.view), url(r'^$', frontpage.view),
url(r'^sponsors$', frontpage.view), url(r'^sponsors$', frontpage.view),
url(r'^sponsors/$', sponsors.view), url(r'^sponsors/$', sponsors.view),