Django: css specificity to a webpage -


i load static files in base.html. contents of master.css specific 1 webpage. how load css not in template, in specific webpage?

{% load staticfiles %} <link rel="stylesheet" type="text/css" href="{% static 'incidents/css/master.css' %}"> 

you do:

{% if request.get_full_path = "page/url/" %}  <link rel="stylesheet" type="text/css" href="{% static 'incidents/css/master.css' %}">  {% endif %}

also think can target template name doing:

{% if views.templatename, %}  <link rel="stylesheet" type="text/css" href="{% static 'incidents/css/master.css' %}">  {% endif %}

don't hold me havent been on django in while.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -