
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.
Begin with a Python refresher to build Django websites, featuring eight beginner lectures with hands-on exercises to reinforce Python basics and guide you through installing Python.
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.
Learn python basics by declaring variables for age and name, then test code in the terminal. Use print to output values and format strings with curly braces and .format.
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 how Python lists work by building and manipulating a dog names list: print, insert at a position, index, delete, update items, check length, and enjoy mixed types.
Master Python loops by iterating through lists with for loops, using range for numeric sequences, and controlling execution with while loops.
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).
Create and use Python classes, define methods with self, instantiate objects, and implement __init__ to initialize instance variables and optional class variables.
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!
Begin building a personal blog locally, learning Django basics like models, migrations, bootstrap, and virtual environments while preparing to push the site live on a personal URL.
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 Django apps organize a website into reusable components, create your first app with manage.py startapp, and structure posts and Site Pages apps to keep code maintainable.
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.
Build a functional Django home page by showing post titles, publication dates, and previews, using model methods for pretty dates and post summaries.
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.
Create a detailed blog post page in Django by configuring url patterns with regex to capture a post id, then render a detail template with that id.
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.
Learn to add a responsive navigation bar to a Bootstrap homepage, including text branding, links (about, Twitter, Facebook), and a collapsible menu with container vs fluid layouts.
Learn to style the home page by containing large post images with a Bootstrap container, center images, apply responsive sizing, and clearly present post titles and date icons.
Learn to add static images to a Django blog by creating a static folder, loading it with load static, and rendering a responsive, centered image.
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.
Create a separate django app named site pages to host standard pages like the about page, wire its urls and views, and integrate nav bar styling for those pages.
Add a site pages app in Django, create an about page with a view and template, wire its URL, update settings, and integrate navigation to reach the about page.
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.
Configure a Django site for production by installing gunicorn in a virtual environment, creating a systemd service, and enabling it to run on startup.
Set up Nginx to host a Django site, configure the server block, static files, unicorn, and the Django settings, then test the deployment.
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.
Set up a Django project, create and activate a virtual environment, install Django, run the dev server, apply migrations, and explore authentication and admin to prepare a sign-up page.
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.
Create a user in django 1.11 by importing the user model and using create_user with username and password from the sign up form. Validate passwords and display errors when needed.
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.
Fix post url schemes by prefixing http/https when missing, and implement upvote and downvote through post requests using forms and csrf in Django.
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.
Implement a Django logout flow by creating the url and view, choosing post for logout, using the Django logout function, and submitting a hidden form via JavaScript to redirect home.
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.
Create a Django user posts page by adding a user posts view and URL. Filter posts by the author and order by vote totals to show a ranked list.
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!