If You Use Django, You Need This VS Code Extension

 

auto-django

If you use django, you will know that when you import your html file into your templates folder, you need to add the static tag to all the links in the html file. This can be a lot of work to do when there is a lot of links in the html file. 

But i may have come up with a solution to that. I created a VS Code extension called Auto-Django. It allows you to automatically add static tags all the links in the html file. Let me show you how it works:

- Download the extension

All you need to do is to open your VS Code and go into the Extension tab, then search Auto-Django, and hit install. Or you can just click this link to install it https://marketplace.visualstudio.com/items?itemName=CodeWithTomi.auto-django

Once you install it, it should look like this:





Using the extension

Now that the extension is installed, what you need to do is to use/test the extension. To do this, open up an html file, then press CMD+SHIFT+P(For Mac) or CTRL+SHIFT+P(For Windows) to open the command pallete. Once you do this, search Auto Django, like this:




Then hit enter, once you do that, all the links will automatically have the static tag added to them like this



Now you can use this feature every time you need it.

Drop a comment below to say what you feel about it. Thanks.

Post a Comment

0 Comments