user7693832
user7693832

Reputation: 6859

Use load static in django templates gets messy code

In my template, i use load static to load static files:

{% load static %}

<link rel="stylesheet" href="{% static 'css/default.min.css?t=227' %}" />

but in the browser html changed to this messy code:

<link rel="stylesheet" href="/static/css/default.min.css%3Ft%3D227">

Upvotes: 0

Views: 94

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599956

Put the query args outside the template tag.

"{% static 'css/default.min.css' %}?t=227"

Upvotes: 1

Related Questions