Skip to main content

Instructor-led training

Advanced Django Training Courseware Training in Antioch, Illinois

Private Python Programming training for organizations from Hartmann Software Group, delivered onsite in Antioch, Illinois or live online.

What you'll learn

This Advanced Django course builds upon the foundation established in the Introduction to Django course, delving deeper into the powerful web framework. Students will learn advanced concepts such as handling messages, working with media files, making complex queries, implementing pagination and ordering, advanced querying and search, deploying websites to production, and customizing Django Admin. The course also includes hands-on exercises and real-world examples, allowing students to apply their knowledge and refine their skills in Django development.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Antioch, Illinois or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Experience with Python. Experience with Django as covered in the Introduction to Django course.

Course Outline

  1. Messages Framework
    1. Message Framework
    2. Adding Messages (Exercise)
    3. Using SuccessMessageMixin (Exercise)
    4. Adding Success Messages to the Joke Views (Exercise)
    5. Adding a Success Message to JokeDeleteView (Exercise)
  2. Media Files
    1. Media File Basics
    2. Adding Media Settings (Exercise)
    3. Uploading a Resume (Exercise)
    4. Checking File Type (Exercise)
    5. Keeping Resume Files Private (Exercise)
    6. Adding an ImageField to the Model (Exercise)
    7. Displaying the Avatar (Exercise)
    8. Amazon Simple Storage Service (Amazon S3)
    9. Setting Up Amazon S3 (Exercise)
    10. Static Settings in Development (Exercise)
  3. Making Queries, Ajax, and View Functions
    1. Useful Prerequisites
    2. Managers and QuerySets
    3. Indexing and Slicing QuerySets
    4. Checking for Existence
    5. Creating, Updating, and Saving Model Instances
    6. QuerySet Methods that Don’t Return QuerySets
    7. One-to-Many Relationships
    8. Many-to-Many Relationships
    9. Spanning Relationships
    10. Joke Voting
    11. Adding a JokeVote Model (Exercise)
    12. Registering the JokeVote Model (Exercise)
    13. Adding Properties to the Joke Model (Exercise)
    14. Rating Jokes Using Ajax (Exercise)
    15. Adding a vote() View Function (Exercise)
    16. Updating the URLConf (Exercise)
    17. Updating the Templates (Exercise)
    18. Model Constraints
    19. Letting JavaScript Know if the User is Logged In
  4. Pagination and Ordering
    1. Fixtures
    2. Loading Data from a Fixture (Exercise)
    3. Pagination (Exercise)
    4. Ordering (Exercise)
  5. Advanced Querying and Search
    1. Field Lookups
    2. Q Objects
    3. Filtering Results by Category, Tag, or Creator (Exercise)
    4. Implementing Search (Exercise)
    5. Aggregation
    6. Getting Joke Ratings (Exercise)
    7. Code Optimization
    8. Installing and Using the Django Debug Toolbar (Exercise)
    9. Brief Introduction to Annotation
    10. Viewing SQL Used in QuerySets
  6. Deploying your Website to Production
    1. Where to Host Your Django Site
    2. Deploying to Heroku (Exercise)
  7. Customizing Django Admin
    1. Django Admin Views
    2. Customizing Titles and Headers (Exercise)
    3. ModelAdmin Attributes that Affect the List View
    4. Creating a Custom ModelAdmin Base Class (Exercise)
    5. Customizing the Django Admin List View (Exercise)
    6. Lists vs. Tuples
    7. ModelAdmin Attributes that Affect Forms
    8. Customizing Django Admin Form Views (Exercise)
    9. Customizing Fieldsets
    10. Modifying the CustomUserAdmin Class (Exercise)
    11. Adding Calculated Read-only Fields
    12. Adding a Link to the Change Password Form (Exercise)
    13. Unregistering Models (Exercise)
    14. Django Admin Groups and Permissions (Exercise)
  8. Additional Topics
    1. Additional Learning
    2. Additional Projects

Where advanced Django gets difficult

The introductory material gets a project running. This course covers the parts that fail only with real data, real users, or a real server. Three areas cause most of the trouble.

  • The ORM is lazy and subtle. The syllabus covers Managers and QuerySets, indexing and slicing, checking for existence, and the QuerySet methods that don't return QuerySets. Code that looks equivalent can differ a lot in how many SQL statements it issues. Spanning one-to-many and many-to-many relationships, field lookups, Q objects, aggregation and a brief introduction to annotation add to this. The course pairs them with the Django Debug Toolbar and with viewing the SQL behind a QuerySet, so you can check what a query does.
  • One feature crosses many layers. The joke-voting sequence adds a JokeVote model, registers it, adds properties to the Joke model, writes a vote() view function, updates the URLConf and templates, and rates jokes over Ajax. Model constraints and telling JavaScript whether the user is logged in are part of the same flow. A mistake in any layer shows up as a vague front-end symptom.
  • Media is not static. Media settings, uploading a resume, checking file type, keeping files private, adding an ImageField and storing files in Amazon S3 are separate concerns. Learners often treat "the upload works" as "the upload is safe." Static settings in development are covered because the two configurations interact.

Customizing Django Admin is a smaller version of the same problem. ModelAdmin attributes for list views and forms, fieldsets, calculated read-only fields, a custom base class, and groups and permissions all have to agree with one another.

Who this course suits and what to take around it

The course is advanced and assumes Python experience plus the Django knowledge covered in the Introduction to Django course. It builds directly on that course's models, views, templates and URL configuration. Developers who have not yet built a basic Django app will spend the three days catching up on the first steps instead of the topics here.

It suits developers maintaining or extending Django applications, and teams that need to add uploads, search, voting, pagination or a tailored admin. It also suits a technical lead planning how a team will handle deployment and admin customization.

For a next step, Advanced Python 3 (3 Day Course) deepens the language skills behind cleaner models, managers and view code. The Python Programming course listing shows the other options.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • User-submitted content with ratings. A team might let users upvote items and see averages. That draws on a vote model, Ajax view functions, model constraints, and aggregation for ratings. The same team could use pagination, ordering, and filtering by category, tag or creator to keep list pages manageable.
  • Document intake. An internal portal might collect resumes or other documents and show profile images. That uses media settings, file type checks, private file storage, ImageField, and a storage backend such as Amazon S3.
  • Back-office admin. A support team might need an admin with a tuned list view, grouped form fields, calculated read-only values, and permissions by group. That maps to the ModelAdmin customization topics, including a shared custom base class.

Using AI coding assistants with these topics

AI coding assistants are useful for boilerplate: ModelAdmin attributes, fieldset layouts, fixtures, a first draft of a search form with Q objects, or the skeleton of an Ajax view. They are less reliable where correctness depends on your project's data and configuration.

  • Query cost. A generated QuerySet can return correct results while issuing far more SQL than needed. Inspect the SQL and check it in the Debug Toolbar.
  • Upload handling. Generated code may check a filename extension and call the file validated, or serve files from a public location. Verify file type checks and privacy with test uploads and direct URL requests.
  • Voting and constraints. Assistants often omit model constraints, or leave the logged-in check on the JavaScript side only. Test duplicate votes and anonymous requests against the view itself.
  • Settings and deployment. Media, static and storage settings differ by environment. Generated settings need review before they go near production.

Treat generated code as a draft: run it, write tests for edge cases, and read the SQL.

Frequently asked questions

What level is this course, and what should I know first?

It is advanced. You should have Python experience and Django experience at the level of the Introduction to Django course.

What topics does it cover?

The syllabus covers the messages framework, media files (including Amazon S3), QuerySets, relationships and Ajax-based voting, pagination and ordering with fixtures, field lookups, Q objects, search and aggregation, query optimization with the Django Debug Toolbar, deploying to production, and Django Admin customization.

Can the course be delivered privately for our team?

Yes. HSG delivers private training for organizations, either onsite at the client's location or live online.

Can the content be customized to our Django and Python versions?

Private courses can be tailored to the technology versions an organization uses, including current releases, and content can be customized to your project. You can describe your requirements through the training proposal request page: /Contact?course=hsg_57091bde4f69ad511755289587077.

Training locations

Advanced Django Training Courseware training across the U.S. and beyond.

We provide private Advanced Django Training Courseware training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Advanced Django Training Courseware training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.