0

I have been importing JS files into my template using:

  <script src="{% static 'inventory/js/panel.js' %}" type="text/javascript"></script>

while importin CSS using

  <link href="{{ STATIC_URL }}common/css/form.css" rel="stylesheet" type="text/css">

Can you tell me how to import CSS files using the static template tag like in importing JS files. Thanks

1
  • Why would it be any different? Commented Aug 8, 2016 at 8:35

1 Answer 1

1

It's almost the same as your js:

{% load staticfiles %}

<link href="{% static "css/base.css" %}" rel="stylesheet"/>
Sign up to request clarification or add additional context in comments.

2 Comments

should be <link href="{% static 'css/base.css' %}" rel="stylesheet"/>
@AndyM. not neccessary, because tags process is separate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.