Skip to content

Instantly share code, notes, and snippets.

@nax3t
Created September 8, 2023 18:38
Show Gist options
  • Save nax3t/3b87f7d60f88e043ab7712cd4efbdbf2 to your computer and use it in GitHub Desktop.
Save nax3t/3b87f7d60f88e043ab7712cd4efbdbf2 to your computer and use it in GitHub Desktop.
Module 1 Study Guide

Study Guide / Review

HTML Basics

HTML (Hypertext Markup Language) is the standard markup language for creating web pages. It defines the structure and content of a web page using a system of tags and attributes.

Key Concepts:

  • HTML Document Structure: An HTML document consists of a <!DOCTYPE>, <html>, <head> (with <title>), and <body> sections.
  • Elements and Tags: HTML elements are represented by tags (e.g., <p>, <a>, <div>).
  • Attributes: Elements can have attributes (e.g., href, src, class) that provide additional information.
  • Text Content: You can add text content using elements like <p>, <h1>, <span>, etc.
  • Links: Create hyperlinks using the <a> tag with the href attribute.
  • Images: Embed images using the <img> tag with the src attribute.
  • Lists: Create ordered <ol> or unordered <ul> lists with <li> items.
  • Forms: Build forms for user input.
    • Form Elements: Common form elements include <input>, <textarea>, <select>, and <button>.
    • Form Attributes: Attributes like action, method, and name define form behavior.
    • Input Types: Different type attributes (e.g., text, password, checkbox) for <input> elements.

Python Fundamentals

Python is a high-level, versatile programming language known for its simplicity and readability.

Key Concepts:

  • Syntax: Python uses indentation (whitespace) for code blocks.
  • Variables: Declare variables with variable_name = <some value> where <some value> can be another variable or any of the python data types.
  • Data Types: Common types include booleans, integers, floats, strings, lists, and dictionaries.
  • Operators: Arithmetic (+, -, *, /), comparison (==, !=, <, >), and logical (and, or, not) operators.
  • Control Structures: Use if, elif, else for conditional logic and for and while loops for iteration.
  • Range: range() function generates a sequence of numbers
  • Functions: Define reusable code blocks using the def keyword. Functions can be defined with parameters that get passed in as arguments when the function is called/invoked in a program.
  • Lists: 0 based index ordered, mutable (changeable) collections of items.
  • Dictionaries: Collections of key-value pairs.
  • Modules and Libraries: Import and use external code with import. Can be third-party packages installed with pip or modules that you create yourself.
  • Exception Handling: Handle errors with try and except.
  • Built-in methods: Lots of built in methods like str, int, len, sum, and so on.

Python Classes and Inheritance

Object-oriented programming (OOP) allows you to define classes and create objects with shared attributes and methods.

Key Concepts:

  • Classes: Define classes with attributes (variables) and methods (functions).
  • Objects: Create objects (instances) of classes.
  • Constructor (__init__): Initialize object attributes.
  • Inheritance: Create new classes that inherit attributes and methods from existing classes.
  • Superclass and Subclass: The parent class is a superclass, and the child class is a subclass.

Django Overview

Django is a high-level Python web framework for building web applications efficiently.

Key Concepts:

  • MVT Architecture: Django follows the Model-View-Template (MVT) architectural pattern.
  • Django ORM: Object-Relational Mapping for database interactions.
  • Django Admin: Built-in admin interface for managing application data.
  • Django Templates: HTML templates for rendering views.
  • URL Routing: Define URL patterns to route requests to views.
  • Django Models: Define data models using Python classes.
  • Django Views: Create views to handle HTTP requests and return responses.
  • Django Templates: Render dynamic content using Django template language.
  • Forms: Generate and process HTML forms with Django forms.
  • Foreign Key and One-to-Many Relationships: Establish relationships between models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment