The Ultimate Django Course
Learn Django from the ground up: models, views, templates, forms, logins, tests and deployment. Your objective: build and launch a real blog.
- 0 students
- 113 lessons
- 7 h 54 min
Created by Ayim Nelson
What you will learn
- Set up a Django project with a virtual environment and apps
- Design models, run migrations and query data with the ORM
- Build pages with views, URLs, templates and static files
- Create, edit and delete content safely with forms
- Add sign-up, login, logout and author-only permissions
- Add comments, tags, search and pagination
- Test a Django app and deploy it to the internet
About this course
Django is the Python framework behind many of the web's busiest sites. In this course you learn it the practical way: by building the Akwaaba Blog from an empty folder to a live website, one short lesson at a time. Every step is explained, and every piece of code has been run on Django 6.1.
For: anyone who knows basic Python (variables, functions, lists, dictionaries and classes) and wants to build websites. You'll work on your own computer, with Python 3.12 or newer.
By the end: you'll have built and deployed a blog where people sign up, write and edit their own posts, keep drafts, comment, browse by tag and search, with an admin site and tests.
Course content
12 sections · 113 lessons
Before you start8 lessons
- What Django isPreviewReading · 3 min
- What you'll build: the Akwaaba BlogPreviewReading · 3 min
- How a Django site answers a requestPreviewReading · 4 min
- What you need on your computerReading · 3 min
- Virtual environmentsReading · 4 min
- Installing DjangoReading · 3 min
- Saving your requirementsReading · 2 min
- Can this computer run Django 6.1?Exercise · 8 min
Your first Django project11 lessons
- Starting a projectReading · 3 min
- A tour of the project filesReading · 4 min
- Running the development serverReading · 3 min
- Projects and appsReading · 3 min
- Creating the blog appReading · 3 min
- Registering the appReading · 3 min
- Your first viewReading · 4 min
- Connecting a URL to the viewReading · 4 min
- Including the app's URLsReading · 3 min
- Reading Django's error pagesReading · 3 min
- Route the requestsExercise · 10 min
Models and the database13 lessons
- What a model isReading · 3 min
- The Post model: title, slug and bodyReading · 4 min
- The Post model: author and datesReading · 4 min
- Drafts and published postsReading · 4 min
- Naming and ordering postsReading · 3 min
- Making migrationsReading · 3 min
- Applying migrationsReading · 3 min
- The Django shellReading · 3 min
- Creating postsReading · 4 min
- Reading postsReading · 4 min
- Filtering and orderingReading · 4 min
- Updating and deletingReading · 3 min
- A Post class of your ownExercise · 10 min
The admin site7 lessons
- Creating a superuserReading · 3 min
- Adding posts to the adminReading · 3 min
- A better post list in the adminReading · 4 min
- Slugs filled in as you typeReading · 3 min
- Making slugs automaticallyReading · 4 min
- Trying the automatic slugsReading · 3 min
- Make a slugExercise · 10 min
Templates and static files10 lessons
- Why templatesReading · 3 min
- Where templates liveReading · 3 min
- Rendering a templateReading · 4 min
- Showing values with variablesReading · 3 min
- Loops and conditions in templatesReading · 4 min
- FiltersReading · 4 min
- A base templateReading · 4 min
- Extending the base templateReading · 3 min
- Adding CSS with static filesReading · 4 min
- Fill in a templateExercise · 10 min
Listing and reading posts10 lessons
- A page for each postReading · 4 min
- Path convertersReading · 3 min
- The post page templateReading · 3 min
- Page not found with get_object_or_404Reading · 4 min
- Linking with the url tagReading · 4 min
- get_absolute_urlReading · 4 min
- Keeping drafts privateReading · 4 min
- Splitting posts into pagesReading · 4 min
- Page linksReading · 4 min
- Pages of postsExercise · 10 min
Forms: writing posts on the site11 lessons
- How forms send dataReading · 3 min
- CSRF protectionReading · 3 min
- A form for postsReading · 4 min
- The new post viewReading · 4 min
- Saving with commit=FalseReading · 3 min
- Redirect after a POSTReading · 3 min
- The form templateReading · 3 min
- Editing a postReading · 4 min
- Deleting with a confirmationReading · 4 min
- Flash messagesReading · 4 min
- Check a formExercise · 10 min
Users: sign up, log in, log out11 lessons
- Django's built-in accountsReading · 3 min
- The login pageReading · 4 min
- Logging out with a formReading · 4 min
- A sign-up pageReading · 4 min
- The sign-up templateReading · 2 min
- Who's logged in?Reading · 3 min
- Requiring a loginReading · 3 min
- Only the author can editReading · 4 min
- A My posts pageReading · 3 min
- The My posts templateReading · 3 min
- Who can edit?Exercise · 12 min
Comments, tags and search11 lessons
- The Comment modelReading · 4 min
- Moderating comments in the adminReading · 3 min
- Showing comments under a postReading · 4 min
- The comment formReading · 3 min
- Saving a new commentReading · 5 min
- TagsReading · 4 min
- Tagging postsReading · 3 min
- A page for each tagReading · 4 min
- Searching with QReading · 4 min
- The search boxReading · 3 min
- Search the postsExercise · 10 min
Testing your blog6 lessons
- Why write testsReading · 3 min
- Your first testReading · 4 min
- When a test failsReading · 3 min
- Testing pages with the test clientReading · 4 min
- Testing logins and permissionsReading · 4 min
- Test a functionExercise · 12 min
Going live12 lessons
- What changes in productionReading · 3 min
- Settings from environment variablesReading · 4 min
- Static files in productionReading · 4 min
- Production-only settingsReading · 4 min
- The deployment checklistReading · 3 min
- Putting your code on GitHubReading · 4 min
- PythonAnywhere: getting the codeReading · 4 min
- PythonAnywhere: the web appReading · 5 min
- Making a secret keyReading · 2 min
- Final steps on the serverReading · 4 min
- Updating your live blogReading · 3 min
- Read settings from the environmentExercise · 10 min
Wrapping up3 lessons
- What you builtReading · 3 min
- Where to go nextReading · 3 min
- Final quizQuiz · 10 min
Reviews
No reviews yet.
Comments
Log in to join the conversation.
Loading comments...