DEV Community

Will Vincent for Learn Django

Posted on • Edited on • Originally published at learndjango.com

How to Learn Django (2020)

As a “batteries-included” web framework, Django comes with a host of built-in features and a correspondingly steep learning curve for newcomers. In this post, I discuss what you need to know before giving Django a proper go and links to recommended resources.

HTML/CSS

Web pages are made out of HTML and CSS. Knowing how to build and deploy static websites is highly recommended before embarking on an attempt at Django. Fortunately, there are several good free resources available including FreeCodeCamp; Shay How’s Learn to Code HTML & CSS series, and HTML & CSS is Hard.

HTML itself is not that deep a topic. You can learn the basics in a day and master most of you’ll need within a week. CSS is, unfortunately, far more complex. You don’t need to become a CSS expert, but you should know how it interacts with HTML and be able to style your static websites somewhat. In practice, most developers rely on a CSS framework like Bootstrap or Tailwind, and in companies Django developers typically don’t touch the front-end at all, so a basic understanding is all that you need.

World Wide Web

It’s necessary to also have a fundamental understanding of how the World Wide Web actually works. Mozilla has probably the best guide called How the Web works which is part of its larger, and also recommended, Learn Web Development series.

Python

Django is written entirely in the Python programming language so it shouldn’t be surprising that Python knowledge is part of the list of prerequisites. The question, though, is how much Python do you need to know? Obviously the more the better but I would argue you don’t need to be a Python expert to use Django. At a minimum, you should understand how to install Python packages (like Django), use a virtual environment, imports, and classes. RealPython is a popular source of Python tutorials but if you’re looking for a book, Python Crash Course covers the basics and is enough background to embark on Django itself.

Databases & SQL

A database-driven website relies on, well, databases so you should have a basic understanding of how SQL works as well as database design principles. Khan Academy has a free guide to SQL and this site has a Database Design Tutorial for Beginners that is also worth reading to understand primary keys, one-to-many relationships, and database normalization.

When using Django itself, the ORM abstracts away the need to write raw SQL but understanding how databases work becomes increasingly essential as websites grow in size.

Git

The final prerequisite is knowledge of Git, the version control system you’ll use on every project. It’s not technically part of Django but you’ll use it on any serious side or professional project. Github has a Git Handbook that is a good first step. You should understand how to install git on a new repository, make commits, and push/pull code to a remote repository either GitHub, GitLab, or BitBucket most likely.

Django Tutorials

Finally we come to Django itself whose official docs feature a Start page. The official Polls tutorial is a good place to start but is not a friendly welcome for those new to web development with frameworks. It does not cover how to install Python or deploy your site to the internet, and goes in-depth on some areas of Django itself.

If you find the official tutorial too much, a gentler introduction can be found in the Django Girls tutorial on building and deploying a blog, or the sample chapters of Django for Beginners which cover the building of three Django sites. Mozilla also has a comprehensive though slightly more advanced guide to Django.

Books

For a book-length treatment, Django for Beginners and Django Crash Course are friendly beginner treatments. For intermediate/advanced coverage, Two Scoops of Django, Django for Professionals(https://djangoforprofessionals.com), and Speed Up Your Django Tests are recommended.

Videos

There are many YouTube videos on Django and the quality varies considerably. Solid options include Corey Schafer’s series as well as those by Traversy Media. For a paid option, JustDjango is quality content.

Podcasts

At the moment, there is only one weekly podcast on Django called Django Chat, hosted by the creator of LearnDjango.com and a Django Fellow, Carlton Gibson. Django Riffs is a budding series and Running in Production often features Django-specific content.

Conferences & Meetups

The best way to learn more and become involved in the community is to attend either a DjangoCon or local Meetup. DjangoCon US has been delayed until 2021 although DjangoCon Africa is scheduled for November, and both DjangoConEurope and PyCon Australia are holding virtual conferences. In addition, there are Django meetups in most major cities that meet monthly and even, these days, virtually.

Django Forum

If you’re stuck on a Django issue, Stack Overflow is always an option but a newer one is the official Django Forum which has a wealth of good advice from experts in the community.

Conclusion

Ultimately, learning Django is a constant endeavor. The framework continues to evolve as does the broader World Wide Web, most notably with the current introduction of Async features in Django 3.0+. With a major new release scheduled for every 9 months, there’s never been a better time to learn Django.

Top comments (14)

Collapse
 
corentinbettiol profile image
Corentin Bettiol

Already making websites since a few years, the Poll tutorial is really a great surprise, since it's crystal clear (all steps detailed, links to useful resource, doc everywhere ...).

If you know html/css, and a programming language (Python is better, but php can also do the trick), you can definitely go for the Poll tuto :)

Collapse
 
nikedife profile image
nikedife

awesome

Collapse
 
msurdi profile image
Matías Surdi

For anyone learning django and that is not willing to learn at the same time React, Vue, etc I'd recommend Unpoly. It is very easy to use to add some dynamism, avoid full page reloads, do ajax updates, etc with minimal conceptual overhead.

unpoly.com/

Collapse
 
partha2000 profile image
Partha Prateem Patra

Thanks Matías. I guess this would be very helpful for me since I am a beginner in django development and I don't have knowledge about frontend frameworks.

Collapse
 
sobolevn profile image
Nikita Sobolev

I also love to learn from examples! And for me boilerplates are the best initial examples.

I recommend to check out wemake-django-template, especially if you are a beginner. It has all the best practices you are looking for.

GitHub logo wemake-services / wemake-django-template

Bleeding edge django template focused on code quality and security.

wemake-django-template

wemake.services Awesome Build status Documentation Status Dependencies Status wemake-python-styleguide

Bleeding edge django2.2 template focused on code quality and security.


Purpose

This project is used to scaffold a django project structure Just like django-admin.py startproject but better.

Features

Installation

Firstly, you will need to install dependencies:

pip install cookiecutter jinja2-git
Enter fullscreen mode Exit fullscreen mode

Then, create a project itself:

cookiecutter gh:wemake-services/wemake-django-template
Enter fullscreen mode Exit fullscreen mode

Who are using this template?

If you use our template, please add yourself or your company in the list.

We offer free email support for anyone who is using this If you have any problems or questions,…

Collapse
 
omarkhatib profile image
Omar

thanks , does django work with microservices and react?
Or it's better to look for something else.

Collapse
 
corentinbettiol profile image
Corentin Bettiol

You can use React with Django 3 :)

Collapse
 
omarkhatib profile image
Omar

using DRF?

Thread Thread
 
corentinbettiol profile image
Corentin Bettiol

Yup, I found a tuto that speaks about it, but I never used drf myself.

Thread Thread
 
omarkhatib profile image
Omar • Edited

Thanks , I will take a look.

Thread Thread
 
omarkhatib profile image
Omar

Chapter 4: Todo React Front-end
The author have also one , good!

Collapse
 
rakshakannu profile image
Raksha Kannusami

Just what I was looking for! Thank you.

Collapse
 
nzejoe profile image
Jonathan C Nzete

Thank you sir.
Your books, Django for Beginners and Django for Professionals has really helped me a lot. Very detailed , I really recommend them if you are new to django and advanced developers.

Collapse
 
c_v_ya profile image
Constantine

Great! Also wanted to share a python slack group where we have a separate Django channel.