
Django Training for Python Developers
This is a Django course for Python developers. The better you know Python, the easier it will be to learn Django. And one of the great things about learning Django is that it will help you improve your Python skills. Through more than 80 exercises and 100s of demos, you will learn to build a fully functional website using Python, Django 3.x, PostgreSQL, Visual Studio Code, GitHub, Amazon S3 (for media storage), SendGrid, and Heroku. You will learn to:
- Build simple web pages using Django templates.
- Build a complete registration and authentication system.
- Make certain features of the site only available to logged-in users.
- Build forms that allow users to upload files. You will also learn to validate those files to make sure they are not dangerous. And you will learn to keep private files, like resumes, private.
- Create sortable and searchable lists and tables of data, and to add pagination to long lists of data.
- Allow users to add and edit data through web forms.
- Use Ajax to make server requests without a full page refresh.
- Use and customize Django admin, Django's built-in administration interface.
- Generate emails with Django.
- Use Git and GitHub for source control.
- Publish your website on Heroku, a popular hosting service.
- Store media files, uploaded by users, using Amazon's S3 service.
Other technologies used, but not taught, in the course include HTML, CSS, Bootstrap, JavaScript, and SQL. Experience with those technologies will serve you well, both in becoming a Django programmer, and in working through this course.
- 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.
- Learn to add feedback messages to let users know about changes.
- Learn to allow users to securely upload files to your server.
- Learn to keep user-uploaded files private.
- Learn to use Amazon Simple Storage Service (Amazon S3) to manage files.
- Learn how to make queries against the database using Django.
- Learn to add custom properties to models.
- Learn to use Ajax to securely make changes to the database without refreshing the page.
- Learn to create constraints to control the data entered into the database.
- Learn to load data with fixtures.
- Learn to add pagination to Django templates.
- Learn to find optimization opportunities the Django Debug Toolbar.
- Learn to speed up your queries by prefetching data.
- Learn to deploy your Django website to Heroku.
- Learn to customize Django admin for staff users.
Learn at your own pace with 24/7 access to an On-Demand course.
- 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
- Messages Framework
- Message Framework
- Exercise: Adding Messages
- Exercise: Using SuccessMessageMixin
- Exercise: Adding Success Messages to the Joke Views
- Exercise: Adding a Success Message to JokeDeleteView
- Media Files
- Media File Basics
- Exercise: Adding Media Settings
- Exercise: Uploading a Resume
- Exercise: Checking File Type
- Exercise: Keeping Resume Files Private
- Exercise: Adding an ImageField to the Model
- Exercise: Displaying the Avatar
- Amazon Simple Storage Service (Amazon S3)
- Exercise: Setting Up Amazon S3
- Exercise: Static Settings in Development
- Making Queries, Ajax, and View Functions
- Useful Prerequisites
- Managers and QuerySets
- Indexing and Slicing QuerySets
- Checking for Existence
- Creating, Updating, and Saving Model Instances
- QuerySet Methods that Don't Return QuerySets
- One-to-Many Relationships
- Many-to-Many Relationships
- Spanning Relationships
- Joke Voting
- Exercise: Adding a JokeVote Model
- Exercise: Registering the JokeVote Model
- Exercise: Adding Properties to the Joke Model
- Exercise: Rating Jokes Using Ajax
- Exercise: Adding a vote() View Function
- Exercise: Updating the URLConf
- Exercise: Updating the Templates
- Model Constraints
- Letting JavaScript Know if the User is Logged In
- Pagination and Ordering
- Fixtures
- Exercise: Loading Data from a Fixture
- Exercise: Pagination
- Exercise: Ordering
- Advanced Querying and Search
- Field Lookups
- Q Objects
- Exercise: Filtering Results by Category, Tag, or Creator
- Exercise: Implementing Search
- Aggregation
- Exercise: Getting Joke Ratings
- Code Optimization
- Exercise: Installing and Using the Django Debug Toolbar
- Brief Introduction to Annotation
- Viewing SQL Used in QuerySets
- Deploying your Website to Production
- Where to Host Your Django Site
- Exercise: Deploying to Heroku
- Customizing Django Admin
- Django Admin Views
- Exercise: Customizing Titles and Headers
- ModelAdmin Attributes that Affect the List View
- Exercise: Creating a Custom ModelAdmin Base Class
- Exercise: Customizing the Django Admin List View
- Lists vs. Tuples
- ModelAdmin Attributes that Affect Forms
- Exercise: Customizing Django Admin Form Views
- Customizing Fieldsets
- Exercise: Modifying the CustomUserAdmin Class
- Adding Calculated Read-only Fields
- Exercise: Adding a Link to the Change Password Form
- Exercise: Unregistering Models
- Exercise: Django Admin Groups and Permissions
- Additional Topics
- Additional Learning
- Additional Projects
Each student will receive a comprehensive set of materials, including course notes and all the class examples.
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
Courses that can help you meet these prerequisites:
Self-Paced Course
- On Demand 24/7
- Readings
- Presentations
- Exercises
- Quizzes
- Full Year of Access
- Learn more