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">
to
<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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b891d179-a6da-4150-8ebd-a966e5af9567%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to