Course duration
- 3 days
Course Benefits
- 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.
Public expert-led online training from the convenience of your home, office or anywhere with an internet connection. Guaranteed to run .
Private classes are delivered for groups at your offices or a location of your choice.
Course Outline
- 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
Class Materials
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
- Basic Django as taught in our Introduction to Django course
Experience in the following would be useful for this Django class:
- JavaScript
- SQL
Courses that can help you meet these prerequisites:
Instructor-led courses are offered via a live Web connection, at client sites throughout Europe, and at our Geneva Training Center.