
Introduction to Django Training
Course Length: 5 days
Delivery Methods:
Available as private class only
Course Overview
In this Django course, you will learn to use Django to build a website like the one at www.djangojokes.com. The course assumes no prior knowledge of Django, but you must have experience with Python. If you do not, we can customize a private class for groups to cover the Python you need to know to work with Django.
Course Benefits
- Learn how to install Django in a virtual environment.
- Create your first Django website.
- Learn to use Git and GitHub to manage Django projects.
- Learn to work with Django models that map to the database.
- Learn how to create template pages using Django’s template language.
- Learn to create your own custom template filters and tags.
- Learn to manage static files (e.g., CSS, JS, and images) in Django.
- Learn to create users using a custom user model.
- Learn to work with Django’s built-in admin site.
- Learn to send emails with Django.
- Learn to process and validate forms.
- Deep-dive into Django models.
- Learn to handle user registration and authentication.
Course Outline
- Setting Up Your Computer
- Demo and Exercise Files
- Recommended Software
- Running Python
- Getting Started with Django
- Welcome to the Server-side
- Google Chrome DevTools: Network Tab
- Creating the Virtual Environment
- Exercise: Creating a Virtual Environment and Installing Django
- Exploring the Django Source Code
- Creating a New Project
- Exercise: Hello, Django!
- Settings
- Django Apps
- Creating a New App
- Exercise: First Django App
- Exercise: Working with Templates
- Exercise: Creating an About Us Page
- Git, GitHub, and an App with a Model
- djangojokes.com
- Version Control Systems, Git, and GitHub
- Exercise: Setting Up VS Code, Git, and GitHub
- Exercise: Creating the Project
- Exercise: Creating a pages App
- Exercise: Creating the jokes App
- Models
- Exercise: Migrating
- Exercise: Creating a Model
- Types of Views
- Exercise: Creating a ListView
- Exercise: Creating a DetailView
- GET and POST Requests
- Exercise: Creating and Updating Jokes
- Deleting Objects
- Exercise: Deleting Jokes
- Template Filters and Tags
- Exercise: Setting Up the Project
- get_context_data()
- Exercise: Adding Template Context
- Template Filter Basics
- Exercise: Adding Filters
- Most Useful Template Filters
- Template Filter Quick Reference
- Template Tag Basics
- Most Useful Template Tags
- Template Tag Quick Reference
- Custom Filters
- Exercise: Creating Custom Filters
- Custom Tags
- Exercise: Creating Custom Tags
- Static Files
- Static File Basics
- Exercise: Adding Static Files to Django Jokes
- Review of the Settings
- Django Admin and the User Model
- The Database
- Exercise: Setting Up PostgreSQL
- The Default User Model
- Exercise: Creating a Custom User Model
- Referencing the User Model
- Exercise: Getting Started with Django Admin
- Exercise: Adding the jokes Table to Django Admin
- Exercise: Installing the Django Admin Documentation Generator
- URLs and Slugs
- Slugs
- Exercise: Creating a Slug-generating Function
- Exercise: Changing Jokes to Use Slugs
- Sending Email with SendGrid
- Transactional Email Services
- Exercise: Getting a SendGrid Account
- Exercise: Creating an Email Utility Function
- Forms and Widgets
- Form Processing
- Understanding Form Fields
- Exercise: Creating a Job Application Form
- Core Field Arguments
- Exercise: Building out the Application
- Typed Choice Fields
- Changing Widgets
- Exercise: Improving the Job Application Form
- Validators
- Exercise: Crispy Forms
- Exercise: Making the Joke Form Crispy
- ModelForms
- Models
- Model Fields
- Model Field Arguments
- ModelForms
- Exercise: Creating a ModelForm
- Many-to-One Relationships
- Exercise: Adding Joke Categories
- Many-to-Many Relationships
- Exercise: Adding Joke Tags
- Exercise: Updating the Joke Templates
- Exercise: Tying Job Applications to Models
- User Registration
- The User-Registration Process
- Exercise: Getting Started with django-allauth
- django-allauth Templates
- Exercise: Making the Authentication Pages Crispy
- Exercise: Updating the _base.html Template
- Email Templates
- Exercise: Custom User Registration
- Exercise: Creating a My Account Page
- Exercise: Associating Users with Jokes
- Mixins
- Exercise: Restricting Joke Creating and Updating
Class Materials
Each student will receive a comprehensive set of materials, including course notes and all the class examples.
Class Prerequisites
Experience in the following is required for this Django class:
- Python
Experience in the following would be useful for this Django class:
- HTML
- CSS
- Bootstrap
Prerequisite Courses
Courses that can help you meet these prerequisites:
Follow-on Courses
Request a Private Class
- Private Class for your Team
- Online or On-location
- Customizable
- Expert Instructors