Python Django Summer Training Course Material

Tools and Preparation :

  1. Install git on your system for here.
  2. Create an Account on Github.
  3. Download and install any one of IDE of your choice – PyCharm, Sublime. For Web – Use Sublime, VSCode.
  4. Download and install python from here.
  5. Download and install SourceTree from here.

Python Reference Links :

  1. CodeAcademy Python  – Tutorials
  2. Official Python Docs
  3. Basics of Python – easy tutorial

Sites and Resources to follow on Python and Other Technologies (More Updates soon) :

  1.  Hacker News
  2.  Tech Crunch
  3.  Google Developers – Youtube
  4.  Youstart Labs – Youtube

Day 1 - Fundamentals of Web and Backend Development

  • Internet and Web
  • Frontend End Development vs Backend Development
  • Server-Client Communication
  • HTTP protocol
  • HTTP methods
  • Python 2 and 3

Day 2 - Python Basics

  • Python Interpretor
  • Python Data types – Int, float, boolean, string, list
  • Python Dynamic Typing
  • Python Indentation
  • Python inputs
  • Python function
  • Python If blocks

Day 3 - Python Basics

  • For Loops
  • If elif else
  • String Slicing and Reversing
  • Duck Typing
  • String Functions – lower, upper, title, find, replace
  • Truthy and Falsy values
  • Split and Join

Assignment 1

Solve Problem of very simple Nature on : Coding Bat Python

Day 4 - Git Basics

  • Git Command Interface
  • Git config setup – user.name and user.email
  • Git Repository Creation – git init
  • Git Staging – git add
  • Git Commit – git commit
  • Saving Commit on Remote Server(Github) – git push
  • Adding remotes  – git remote
  • git status, git log
  • Using SourceTree to making changes from UI
  • Github repo creation
  • Git Clone

Day 5 - Python Data structures - List, Tuple and Dictionary

  • Collections in Python – List, Tuple, Dictionary, Sets
  • List – Sequential, Mutable
  • Tuple – Sequential, Immutable
  • Dictionary – Hash maps , mutable, non – sequential
  • List functions – Append & Pop
  • Nested Lists
  • Nested Dictionaries
  • Swapping variable – multi variable assignment

Day 6 - Python Data structures - Comprehensions / HTML and DOM

  • List Functions – count, index
  • Using For Loop – iteration on collections
  • Comprehensions
  • HTML Markups
  • HTML Elements – Tags and Attributes
  • HTML DOM Tree
  • HTML Tags – DIV, SPAN, A, IMG, P
  • Absolute and Relative Paths
  • ID vs CLASS attributes

Day 7 - Setting up Django framework

  • Installing pip
  • Python Virtual Environment
  • Installing Django using Django
  • Postgres Setup

Day 8 - Python Functions / Django Server

  • Python Functions of various types
  • Python globals() and locals()
  • Django-admin
  • Creating a Project
  • Running project on local server
  • Creating superuser
  • Understanding project file structure

Day 9 - Python Object-Oriented Programming

  • Python Class
  • Python Objects
  • Instance variables
  • Class variables
  • Use of constructor __init__()
  • use of self keyword

Day 10 - Python Class and Inheritance / HTML Forms

  • Python Base Class and Derived Class
  • Use of Parent Constructor
  • Multiple Inheritance
  • HTML forms – input types
  • HTML form – name and values
  • HTML form – GET and POST

Day 11 - CSS

  • Applying Styles in various methods  – external stylesheet (css), internal style, inline styles
  • Cascading stylesheets
  • User Agents Stylesheets
  • Priority of Styles
  • Use of !important
  • CSS Style element – Selectors, Property-Value pairs
  • CSS properties – background, color etc
  • CSS directional properties – Margin, padding, border (shorthand notations)
  • Special properties- z-index,
  • Animate CSS

Day 12 - Bootstrap

  • Bootstrap Install
  • Bootstrap examples – buttons, alerts, forms
  • Bootstrap colors – success, danger, info, primary, default
  • Bootstrap Grid system – use of rows and cols and 12-col system
  • Responsive layout and use of – xs, sm, md, lg
  • BootSwatch themes

Day 13 - Packages and Import

  • Python import statement
  • Importing Python files in another file
  • Using common Python Modules
    • os – getcwd, listdir, mkdir, path
    • shutil – copy
    • sys
  • Using Command Line arguments in Python scripts

Day 14 - Django - Creating the App (Part1)

  • Creating a Django Project
  • Connecting PostgreSQL to Django Project
  • Using PgAdmin 4
  • Running migrations
  • Creating super user
  • Creating an App in the Project

Day 15 - Django - Creating the App and Models

  • Creating the App
  • Creating Models in models.py
    • Show migrations
    • Make migrations
    • Run migrations
  • Registering models in Admin panel

Day 16 - Django - Creating different Field Types in Models

  • Field Types
    • AutoField
    • CharField
    • DateField
    • TimeField
    • Boolean Field
    • IntegerField
  • Field Options
    • null
    • auto_now
    • auto_now_add
    • primary_key
    • unique
    • default
  • Foreign Keys
  • Using __str__() function for Objects

Day 17 - Django - Querying the models in Shell

  • Django Shell
  • Using Models as Class constructors
  • Using .save()
  • Model.objects.filter()
  • Model.objects.all()
  • Foreign key constraints : Model.foreign_obj_set.all()
  • Model.objects.get()

Day 18 - Django - Using Views.py for generating views

  • Views.py
  • Urls.py
  • Configuring a route to function in Views.py
  • using HTTPResponse

Day 19 - Django - Using DTL as templating language of Django

  • Using render method
  • Passing a context as dictionary
  • {% %} and {{}} notations

Day 20 - Django - Understanding use of forms and request in Django

  • request parameters in View
  • using request.POST and request.GET params
  • Saving data from forms
  • Using /static/ directory for images, css and JS
  • CSRF decorators

Day 21 - Django - Using Filters for advanced queries

  • Django built-in filters
  • Using DTL for, if etc
  • Displaying dynamic pages depending on Inputs

Day 22 - Creating a Blog Project using Django - Part1

  • Creating the Database Models
    • Blog
    • Post
    • Comment
  • Creating the constraints and relation
  • Creating a new project and app
  • Attaching models to the admin panel

Day 23 - Creating a Blog Project using Django - Part2

  • View Creation and Routing
    • Creating templates with Bootstrap
    • Creating routing in urls,py
    • Creating the template show all blogs in a page
    • Creating settings for TEMPLATE directory
    • Creating Static Directory

Day 24 - Creating a Blog Project using Django - Part3

  • Creating Shortcut route URLs
  • Django URL variable parameters and regular expressions
  • Using variable parameters in shortcuts
  • Creating redirection in Django
  • Creating a blog creation page

Day 25 - Creating a Blog Project using Django - Part4

  • Creating Author page
  • Creating Author page linking and more queries
  • Creating comments and saving comments
  • Redirecting to same page after submission of comments

Day 26 - Creating a Blog Project using Django - Part5

Day 27 - Native JavaScript

  • Using JavaScript and Document Object Model
  • JavaScript ID and Selection
  • JavaScript modifying DOM elements
    • .innerText
    • innerHTML
    • style
    • value
  • JavaScript Events
    • onclick
    • onkeydown
    • onkeypress

Day 28 - jQuery

  • Jquery and DOM manipulations
    • .html()
    • .text()
    • .val()
    • .css()
    • .attr()
    • .append()

Day 29 - jQuery and AJAX calls / Using REST APIs

  • Jquery and AJAX calls
    • .ajax() calls
    • API calls
    • Marvel API example
    • Random User Example

Day 30 - Creating Your own API using TastyPie

  • Tastypie Django Module
  • Installing Tastypie
  • Creating Tastypie resource file
  • Attaching URL to resources
  • GET request to URLs to get informations
  • POST request to URLs for creating new resources

Day 31 - Using in-built User Model in Django Auth libararies

  • Using Django User Model
    • first_name
    • last_name
    • username
    • password
    • email
  • Creating User and attaching to admin panel
  • Changing roles of the user in admin panel

Day 32 - Using in-built User Model - Authenticated Request

  • Creating Login functions
    • Checking authorized Access
    • Redirecting unauthorized access
    • In-built session management and request.user object
    • @login_required decorator

Day 33 - Extending Base Views in Django

  • Creating Base layouts and extending layouts
    • extends
    • block
    • using common header footer by extending the base layout

Day 34 - ModelForms for Models

  • Creating ModelForms
  • Saving Model forms using .save()
  • ModelForms as a way to minimize code and error possibilities.

Day 34 - ModelForms for Models

  • Creating ModelForms
  • Saving Model forms using .save()
  • ModelForms as a way to minimize code and error possibilities.

Day 35 - Generics Views and Class based Views

  • Class-Based Views
  • ListView
  • DetailView

Day 36 - Generics Views and Class based Views

  • FormViews
  • CreateView
  • EditView
  • DeleteView

Day 37 - Merging two django Apps

  • Namespace for URLs
  • extending existing User model and adding new fields
  • Running migrations after cleaning database history