in the conversion of HTML template to Django template, sometimes it is hard 
to find&remplce static paths.
In current Django template we should change for example this:

<link rel="stylesheet" href="css/w3.css">
<link rel="stylesheet" href="{% static 'css/w3.css' %}">

as you see we add two parts to the href:

<link rel="stylesheet" href="*{% static '*css/w3.css*' %}*">

We can also do in this order:

(2) <link rel="stylesheet" href="*{% static '**' %}*css/w3.css">

In this way, we need to do only one find/replace. But in the previous way, 
we should first do find/replace on beginning and then add "%}" to the end. 
Maybe with some find/replace on every suffix (jpg,jpeg,css,js,png...)
But in way (2) We need only one find/replace if we have one asset directory 
in template.
In this way, We can give the static function default value blank in order 
to put just *{% static %}*.

You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

Reply via email to