For many people, it is not easy to make Django work with modern frontend tech, such as
If we check online, many blog posts and tutorials are from view of frontend (such as building Single-page application), which might not work very well if we want to put JS, CSS files in Django template.
What is more, popular Django boilerplate projects on Github (such as cookiecutter-django) are still using a little outdated frontend tech (
This is a PAIN, so I decide to help people solve it!
Webpackis the most popular bundle solution in the frontend community today, it has received 50k stars on Github.
- It has a great ecosystem, many plugins, loaders. If we search
webpackon npmjs.com, we can get 20k resulst.
- If we do not need
Vue, we can still use Webpack to help us compile
SCSSand do many other things (Many people do not know that!)
- With a proper config, Webpack can save time and let us build modern web application in quick way.
- We can still use Django template syntax and HTML as we are familiar with
- We do not need DRY (Django REST framework) and similar frameworks to expose data through API.
- We do not need to implement JWT, but using Django
- We can write JS and SCSS in modern syntax, the code is more readable and easy to maintain.
- Code linter can help check JS and CSS code style.
- We can even develop in a flexible way, for example, we can use
Vue.jsto build some components in the web pages, and write other parts in Django template.
What is included:
- 7 blog posts which are all FREE
- An open source project on Github which help.
You can check Definite Guide to Django and Webpack to learn more about this tutorial series.