Course Outline

Who should attend

The training is primarily targeted at people who have a good understanding of the Django framework and are in the process of building and deploying real-world, web-scale applications in Django. The training sessions will look at how Django applications can be built in a distributed team and deployed to scale.


Must Have
  • Good knowledge of Python, OOP in Python
  • Knowledge of the Linux environment
  • Hands-on experience with Django environment, models, template engine and views
Good to Have
  • Knowledge of building scalable web scale applications and the challenges involved
  • Understanding of MVC/MTV architectures

Course Outline for Advanced django training

Dive into Django
  • Creating a project
  • Understanding the Django project structure
  • A bit of Django internals — overview of the Django source
Deploying Django
  • Packaging Django Applications
  • Introduction to python packaging
  • pip and distribute
  • pip requirements
  • Scaling Django Applications
  • Separating out the DB server
  • Separating out the media server
  • Load Balancing and Redundancy
  • Django setup via virtualenv and virtualenvwrapper
Working with Models and Databases (Concept)
  • Datastore design considerations
  • Relational v/s NoSQL stores
  • Understanding database abstraction layers (DAL)
  • Entities, Relationships
  • Tables, Fields, Keys, Indexes
  • Object Relational Mapping (ORM) and ORM issues
Django Model Basics
  • Creating models
  • Fields, Field types and Field Options
  • Handling relationships - OneToOne, OneToMany, ManyToOne
  • Object CRUD
  • Creating objects
  • Retrieving objects
  • Filters when retrieving objects
  • Comparing objects
  • Updating objects
  • Deleting objects
Advanced Model Handling
  • Model Inheritance
  • Aggregation
  • Joins and Aggregates
  • filter() and exclude()
  • order_by()
  • values()
  • Managers
  • Working with NoSQL stores
  • Performing raw SQL queries
  • Transactions
  • Working with multiple databases
Handling Migrations
  • Issues with db migration
  • South — the de-facto Django migration utility
  • Migrating forward(up)
  • Migrating back (down)
  • Resolving conflicts during migration
Working with Controllers, Views and Templates (Concept)
  • Data formats
  • XML and JSON
  • MVC v/s MVP v/s MTV
  • Thin clients v/s Thick clients
  • Serializing and De-serializing of objects
  • Conversion between Python objects and Javascript objects
  • Need for templates
  • Anti-patterns in MVC design
Forms Framework
  • Widget, Field, Form and Form Media
  • Tying form objects with Views
  • Custom Validation Rules
  • Customizing the look and feel
  • Creating forms from models
Template Engine
  • Using the template system
  • Template, Context, Variables, Template Tags and Filters
  • HTML escaping
  • Using templates in views
  • Template Inheritance
  • Template Loaders
Extending the Template System
  • Creating a template library
  • Writing custom template filters
  • Writing custom template tags
  • Writing custom template loaders
  • Session handling
  • Enabling sessions
  • Configuring session engine
  • Using sessions in views
Request and Response Objects
  • HttpRequest object
  • UploadedFile object
  • QueryDict object
  • HttpResponse object
Admin site
  • Activating the admin site
  • Customizing the admin form
  • Adding related objects
  • Authentication Overview: Users, Permissions and Groups
  • User Management
  • How passwords are stored
  • Using authentication in web requests — login, logout and password changes
  • Loggers, Handlers, Filters and Formatters
  • Using logging in code
  • Configuring logging via
  • Installing and testing Sentry via Raven
  • Using Sentry in Django Applications
  • Configuring Sentry
  • Setting up the cache
  • Various caching backends available
  • Cache configuration
  • Per-Site Cache
  • Per-View Cache
  • Caching Template Fragments
  • Caching specific objects using low-level Cache API
  • Handling issues with upstream caches
  • Using Vary Headers
Search Plugins
  • Haystack
  • Installation of Haystack and other dependencies
  • Setting up the fields to be searched
  • Setting up the search form
  • Building indexes
  • Updating indexes
  • Sphinx
  • Setting up Sphinx search
  • Testing the setup
  • Using Sphinx via Django
  • Comparison of the Haystack based backends and Sphinx backend
Media Storage
  • Managing media files
  • Default file storage
  • Custom storage systems
  • Django storages plugin
Handling models RESTfully
  • REST principles and HTTP
  • Introduction to Tastypie plugin
  • Resources and ModelResources — the “R†of REST
  • Working with Django Models
  • Working with non-models
  • Working with differences from backend models — The hydrate/dehydrate cycle
  • Unit testing using the builtin django test framework
  • Use of fixtures
  • Testing models
  • Testing views
  • Advantages of nose
  • Use of django-nose for testing
Other Important Plugins
  • Asynchronous task processing — the need
  • Asynchronous task processing in Django using Celery, Kombu and a MQ backend
  • Using django-extensions
  • Using the contrib packages
Client Side
  • Introductory Javascript
  • Working with the Browser DOM
  • Handling events
  • Asynchronous requests and XMLHTTP
  • Frontend performance considerations
  • Using AJAX in Django - JSONResponse instead of HTTPResponse

The classroom training will be provided in Bangalore (Bengaluru), Chennai, Hyderabad or Mumbai and will be conducted in the client's premises. All the necessary hardware/software infrastructure must be provided by the client.