Course Overview

Geared for experienced web developers new to Python, Introduction to Full Stack Web Development with Python and Django is a five-day hands-on Python training course that teaches students how to develop Web applications using the Django framework. Students will explore the basics of creating basic applications using the MVC (model-view-controller) design pattern, as well as more advanced topics such as administration, session management, authentication, and automated testing. This comprehensive, practical course provides an in-depth exploration of working with the programming language, not an academic overview of syntax and grammar.  Students will immediately be able to use Python to complete tasks in the real world.

Key Learning Areas

This course is approximately 40% hands-on, combining expert lecture, real-world demonstrations and group discussions with machine-based practical labs and exercises.

Working in a hands-on learning environment, guided by our expert team, attendees will learn to:

  • Develop full-stack web sites based on content stored in an RDMS
  • Use python data types appropriately
  • Define data models
  • Understand the architecture of a Django-based web site
  • Create Django templates for easy-to-modify views
  • Map views to URLs
  • Take advantage of the built-in Admin interface
  • Provide HTML form processing

Course Outline

The Python Environment

  • Starting Python
  • Using the interpreter
  • Running a Python script
  • Getting help
  • Editors and IDEs

 Getting Started

  • Using variables
  • Built in functions
  • Strings
  • Numbers
  • Converting among types
  • Writing to the screen
  • Command line parameters

Flow Control

  • About flow control
  • Conditional expressions
  • Relational and Boolean operators
  • while loops

Lists and Tuples

  • About sequences
  • Lists and list methods
  • Tuples
  • Indexing and slicing
  • Iterating through a sequence
  • Sequence functions, keywords, and operators
  • List comprehensions

Working with Files

  • File overview
  • The with statement
  • Opening a file
  • Reading/writing files

Dictionaries and Sets

  • About dictionaries
  • Creating and using dictionaries
  • About sets
  • Creating and using sets

Functions

  • Returning values
  • Function parameters
  • Variable Scope
  • Sorting with functions

Errors and Exception Handling

  • Exception overview
  • Using try/catch/else/finally
  • Handling multiple exceptions
  • Ignoring exceptions

Modules and Packages

  • Creating Modules
  • The import statement
  • Module search path
  • Creating packages

Classes

  • About OO programming
  • Defining classes
  • Constructors
  • Properties
  • Instance methods and data
  • Class/static methods and data
  • Inheritance

Django Architecture

  • Django overview
  • Sites and apps
  • Shared configuration
  • Minimal Django layout
  • Built in flexibility

Configuring a Project

  • Executing manage.py
  • Starting the project
  • Generating app files
  • App configuration
  • Database setup
  • The development server
  • Using cookiecutter

Creating Models

  • Defining models
  • Related objects
  • SQL Migration
  • Simple model access

Login for Nothing and Admin for Free

  • Setting up the admin user
  • Using the admin interface

Views

  • What is a view
  • HttpResponse
  • URL route configuration
  • Shortcut: get_object_or_404()
  • Class-based views

Templates

  • About templates
  • Variable lookups
  • The url tag
  • Shortcut: render()

Querying Models

  • QuerySets
  • Field lookups
  • Chaining filters
  • Slicing QuerySets
  • Related fields
  • Q objects

Advanced Templates Use

  • Comments
  • Inheritance
  • Filters
  • Escaping HTML
  • Custom filters

Forms

  • Forms overview
  • GET and POST
  • The Form class
  • Processing the form
  • Widgets
  • Validation
  • Forms in templates

Automated Testing

  • Why create tests?
  • When to create tests
  • Using Django's test framework
  • Using the test client
  • Running tests
  • Checking code coverage

Who Benefits

This introductory-level Python course is geared for experienced web developers new to Python who want to use Python and Django for full stack web development projects.

Prerequisites

Basic familiarity with any programming or scripting language would be helpful, along with a working, user-level knowledge of Unix/Linux, Mac, or Windows.