
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Going over what we'll learn and how to get the most out of this course.
Check python installation on mac, linux, or windows using terminal or command prompt and verify with python --version or python3 --version; install python 3 from the download page if needed.
Master if statements in Python using indentation to define blocks, test conditions, and use else and elif. Explore booleans, comparisons, equality, and single-line and triple-quoted multiline comments.
Define and call functions in Python by using def, naming the function, and indenting its body. Pass parameters, use defaults, and return values to print or format strings.
Learn to use Python dictionaries to store data as key-value pairs with curly braces, perform lookups, and add, delete, and update entries, noting that order is not guaranteed (dogs example).
Finish the Python refresher to solidify a beginner's foundation for Django, with a focus on functions and strings. Proceed to the next Django sections and ask questions if anything's confusing.
Project Kickoff for the Pig Latin Translator. This section is all about learning the basics of Django.
Using Pip3, we'll install Django.
From the terminal, we'll create our new Django project.
Now that our project has been created, let's talk about the auto generated files Django created for us.
One of the most important concepts in Django. How to route traffic with URL dispatching.
We'll bring HTML into our project to enhance our web page.
We'll create a basic form to submit text to be translated.
We cover how to send and process text from a textfield.
The dirty work of translation! But pigs love dirty work ;)
We'll show the Pig Latin translation in our HTML file.
Time to test your learning! Go add an about page to your site!
I'll show you how I added an about page. *Only watch if you have completed the challenge already*
Wrapping things up. Time to start a blog!
Build a personal Django blog sketch with a customizable title, home page, and posts list and detail view, plus discuss comments and virtual environment setup.
Learn how to fetch posts from the database in Django 1.11, order by publication date, and render them on the home page using a template loop.
Display blog post images on the homepage by using an HTML image tag and configure Django to serve media via urls.py and settings, including media URL and media root.
Discover how to bootstrap a blog, adding a navigation bar and appealing styling with Bootstrap by copying the basic template from getbootstrap.com and linking CSS and JavaScript via CDN.
Transform the Django 1.11 post detail page by reusing the home page layout, adjusting image height to 300px and the title, removing unnecessary widgets, and preparing for the discuss module.
Learn to add a Disqus comment widget to blog posts by embedding a universal code. Use a unique page identifier, like a post id, to attach comments correctly.
Learn to build and deploy a Django blog by structuring apps, using Bootstrap, and managing models and the admin panel, ending with live posting.
Create a non-root django user and grant sudo privileges, then test login from a separate terminal window. Disable root login, reload sshd, and enable ufw to secure the ubuntu server.
Follow a Digital Ocean guide to set up Django 1.11 on your Ubuntu machine, installing Python 3, pip, virtualenv, nginx, and unicorn to serve Django locally.
Upload your Django blog project to a remote server with FileZilla, skip the virtual environment, and set up a server-side virtual environment before running the app.
Learn how to run a Django development server on port 8000, configure firewall rules, install Django and pelo, set allowed hosts, and test a live deployment from a server IP.
Build a Reddit-like site using Django, implementing user authentication with signup, login, and logout, and enabling link submission, upvotes, and downvotes along with comments.
Review the sketch for building a Reddit clone interface with home page, post submission, upvote/downvote, and user authentication. Implement sign up, login, and logout flows with a navigation bar.
Create an accounts app to build a sign up page, configure a sign up view, template, and URL, and implement a form with username, password, and confirm password.
Learn to wire a signup form with action and post method, implement the CSRF token protection, and handle user creation by checking request.method (POST vs GET) within Django's authentication workflow.
Enforce unique usernames during signup by checking for existing users and returning an error if taken, then create the user and log them in automatically.
Create a django login page mirroring the sign-up form, implement username and password authentication, wire up login URLs and views, and validate credentials to enable user login.
Simplify Django projects by using include to delegate url handling to app-specific url files, such as accounts, enabling clean routing for login and signup views.
Learn to implement a custom login flow with a next parameter that redirects users to the page they originally attempted, using a hidden input and a custom login template.
Learn to save a post object in django 1.11 by handling POST requests, filling title, url, pub_date, author, and a default vote_total of 1, and saving to the database.
Validate the title and URL for new posts, show clear errors when missing, and implement a home page that redirects users after posting.
Design a Django 1.11 homepage that lists posts ordered by vote totals, with clickable titles, author usernames, and dates. Implement redirects, feed posts to the template, and sketch upvote/downvote controls.
Extend templates to create a site-wide base.html with a reusable navigation bar showing login, logout, or sign-up options based on user state, and use blocks to reuse content across pages.
Polish the Django homepage by adjusting layout, formatting publication dates, and implementing per-post upvote and downvote functionality with Bootstrap glyphs, hidden forms, and proper sorting for a Reddit-like clone.
Add a feature where clicking a user name shows all posts by that user on a dedicated page, with upvote/downvote work, and no new post button.
Finish the Reddit clone and reflect on your progress, apply your Django skills to your next project, and check the bonus lecture with discounts as you go beyond this course.
Welcome to The Ultimate Beginner's Guide to Django. If you're brand new to Django, or have gotten lost in online tutorials, this is the course for you. I'll take you from being an absolute beginner to actually creating three complete Django websites. We'll also cover how to publish your sites.
This course starts with a Python Refresher. Django is a web framework written in Python. If you're new to Python, or just a bit rusty, this section will get you up to speed as quickly as possible. You don't need to be a Python expert to make Django website, but a base knowledge is needed. In the Python Refresher I'll teach you a new concept, show you some examples, then present you with a coding challenge to make sure you've understood that concept.
The three websites we'll make are as follows:
Also included in the course is a section showing you how to deploy your blog to a server and publish it for the world to see! I'll then take you step by step through working with a Ubuntu Linux server that will run your Django code 24/7.
What are the key topics covered in this course?
Feel free to take a free preview of this course to see if it's a good fit for you. Remember, you have a 30-day money-back guarantee with this course, so if for any reason you don't like it, you can get a full refund. There's no reason not to sign up!
Thanks for checking out The Ultimate Beginner's Guide to Django. See you on the inside!