Course outline for Advanced Django

Pre-requisites for learning Advanced Django

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

Training Mode

Online training for Advanced Django

We provide:

  • Instructor led live training
  • Self-paced learning with access to expert coaches
  • 24x7 access to cloud labs with end to end working examples

All jnaapti sessions are 100% hands-on. All our instructors are engineers by heart. Activities are derived from real-life problems faced by our expert faculty. Self-paced hands-on sessions are delivered via Virtual Coach.

Classroom training for Advanced Django

Classroom sessions are conducted in client locations in:

  • Bengaluru
  • Chennai
  • Hyderabad
  • Mumbai
  • Delhi/Gurgaon/NCR

Note: Classroom training is for corporate clients only

Detailed Course Outline for Advanced Django

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

Middleware

  • 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

  • Authentication Overview: Users, Permissions and Groups
  • User Management
  • How passwords are stored
  • Using authentication in web requests — login, logout and password changes

Logging

  • Loggers, Handlers, Filters and Formatters
  • Using logging in code
  • Configuring logging via settings.py
  • Installing and testing Sentry via Raven
  • Using Sentry in Django Applications
  • Configuring Sentry

Caching

  • 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

Testing

  • 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