### Start Development Server Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Launch the local development server to test changes. This command is typically used after migrations and initial data setup. ```bash ./manage.py runserver ``` -------------------------------- ### Serve Python.org Locally Source: https://github.com/python/pythondotorg/blob/main/README.md Run this command to start a local development server for python.org. Ensure you have the necessary prerequisites installed. ```bash make serve ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Install the project's development dependencies within the activated virtual environment. The '[dev]' argument installs optional dependencies for development. ```bash $ pip install -e '.[dev]' ``` -------------------------------- ### Install Dependencies and Minify CSS Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Install Node.js dependencies and then minify CSS files for production. This is an optional step for development. ```bash npm install make css ``` -------------------------------- ### Clone Pythondotorg Repository (Manual Setup) Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Clone the Pythondotorg repository using Git for manual setup. This command is an alternative to the SSH-based clone. ```git $ git clone git://github.com/python/pythondotorg.git ``` -------------------------------- ### Link and Anchor Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Provides an example of creating a hyperlink using the tag, linking to another page or an anchor on the same page. ```html link text ``` -------------------------------- ### Definition List Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Shows how to create a definition list using
,
, and
tags for terms and their descriptions. ```html
Definition term
Definition
Definition term
Another definition term
Definition of both terms above
``` -------------------------------- ### Ordered List Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Demonstrates the structure of an ordered list with nested sub-lists using the
    and
  1. tags. ```html
    1. List item one
    2. List item two
      1. Nested list item one
      2. Nested list item two
    ``` -------------------------------- ### Heading - H6 Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Example of a sixth-level heading (h6) for document hierarchy. ```html
    Sixth-Level Header [with a Link](#)
    ``` -------------------------------- ### Heading - H5 Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Example of a fifth-level heading (h5) for document hierarchy. ```html
    Fifth-Level Header [with a Link](#)
    ``` -------------------------------- ### Paragraph Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Standard HTML paragraph markup. ```html

    This is a paragraph

    ``` -------------------------------- ### Heading - H1 Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Example of a primary importance heading (h1). Can include links. ```html

    This is a heading of primary importance

    ``` -------------------------------- ### Unordered List Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Illustrates an unordered list with nested sub-lists using the
      and
    • tags. ```html
      • List item one
      • List item two
        • Nested list item one
        • Nested list item two
      ``` -------------------------------- ### Fastly Production CDN Configuration Source: https://github.com/python/pythondotorg/blob/main/infra/cdn/README.md Example of how to configure the Fastly production CDN service using the module. Ensure all required variables like API keys and logging configurations are provided. ```hcl module "fastly_production" { source = "./cdn" name = "CoolPythonApp.org" domain = "CoolPythonApp.org" subdomain = "www.CoolPythonApp.org" extra_domains = ["www.CoolPythonApp.org"] backend_address = "service.CoolPythonApp.org" default_ttl = 3600 datadog_key = var.DATADOG_API_KEY fastly_key = var.FASTLY_API_KEY fastly_header_token = var.FASTLY_HEADER_TOKEN s3_logging_keys = var.fastly_s3_logging } ``` -------------------------------- ### Heading - H3 Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Example of a third-level heading (h3) for document hierarchy. ```html

      Third-Level Header [with a Link](#)

      ``` -------------------------------- ### View Local Development Server Output Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md This output indicates that the development server has started successfully and is accessible at http://0.0.0.0:8000/. You can stop the server using CONTROL-C. ```bash web_1 | Starting development server at http://0.0.0.0:8000/ web_1 | Quit the server with CONTROL-C. ``` -------------------------------- ### Heading - H2 Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Example of a secondary level heading (h2). Suitable for sub-headers. ```html

      Second-Level Header [with a Link](#)

      ``` -------------------------------- ### Heading - H4 Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Example of a fourth-level heading (h4) for document hierarchy. ```html

      Fourth-Level Header [with a Link](#)

      ``` -------------------------------- ### Create PostgreSQL Database Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Create a new PostgreSQL database named 'pythondotorg' with UTF-8 encoding and en_US.UTF-8 collation. This command is used for manual setup. ```bash $ createdb pythondotorg -E utf-8 -l en_US.UTF-8 ``` -------------------------------- ### Strong Importance Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Illustrates how to denote text with strong importance using the tag. ```html Do not under any circumstances stick nails in the electrical outlet. ``` -------------------------------- ### Stressed Emphasis Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Shows how to apply stressed emphasis to text using the tag, indicating pronunciation differences. ```html You simply must try the negitoro maki! ``` -------------------------------- ### Blockquote Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Represents a section quoted from another source, optionally with a citation. ```html

      Quoted text

      Source of the Quote

      ``` -------------------------------- ### Fastly NGWAF Activation Source: https://github.com/python/pythondotorg/blob/main/infra/cdn/README.md Example snippet showing how to activate the Fastly Next-Gen Web Application Firewall (NGWAF) for a Fastly service. This is an optional configuration. ```hcl module "fastly_production" { source = "./cdn" ... activate_ngwaf_service = true ... } ``` -------------------------------- ### Figure with Caption Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Demonstrates the use of the
      element to group images or other self-contained content with an optional
      . ```html
      Alt text displayed when image does not load
      An optional caption for the content above with an optional citation
      ``` -------------------------------- ### Run create_initial_data with --app-label option Source: https://github.com/python/pythondotorg/blob/main/docs/source/commands.md Executes the create_initial_data command to create data for a specific app. Provide the app's label to target data generation. ```bash $ ./manage.py create_initial_data --app-label jobs ``` -------------------------------- ### Create Initial Data Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Populate the database with initial data for commonly used applications. Refer to the documentation for command options. ```bash ./manage.py create_initial_data ``` -------------------------------- ### Run create_initial_data with --flush option Source: https://github.com/python/pythondotorg/blob/main/docs/source/commands.md Executes the create_initial_data command and flushes the database first. Use this to ensure a clean slate before creating new data. ```bash $ ./manage.py create_initial_data --flush ``` -------------------------------- ### Run create_initial_data command Source: https://github.com/python/pythondotorg/blob/main/docs/source/commands.md Executes the create_initial_data management command to populate the application with initial data. This is the basic usage. ```bash $ ./manage.py create_initial_data ``` -------------------------------- ### Apply Migrations Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Run this command to apply database migrations to your local environment. ```bash make migrate ``` -------------------------------- ### Horizontal Rule Example Source: https://github.com/python/pythondotorg/blob/main/templates/python/inner.html Represents a thematic break between sections or topics. ```html * * * ``` -------------------------------- ### Configure Database with dj-database-url Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Configure the database connection in 'pydotorg/settings/local.py' using dj_database_url.parse or by setting the DATABASE_URL environment variable. ```python DATABASES = { 'default': dj_database_url.parse('postgres:///your_database_name'), } ``` -------------------------------- ### Create PostgreSQL Database with Postgres User Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md If the default 'createdb' command fails due to permission errors, use this command to create the 'pythondotorg' database with the 'postgres' user as the owner. ```bash $ sudo -u postgres createdb pythondotorg -E utf-8 -l en_US.UTF-8 ``` -------------------------------- ### Run Tests Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Execute the project's test suite to ensure code quality and identify regressions. This command verifies the current state of the application. ```bash ./manage.py test ``` -------------------------------- ### Run Database Migrations Source: https://github.com/python/pythondotorg/blob/main/docs/source/install.md Apply database schema changes. This command is essential after setting up a new database or pulling changes that affect the database structure. ```bash ./manage.py migrate ``` -------------------------------- ### Launch Interactive Shell Source: https://github.com/python/pythondotorg/blob/main/templates/python/index.html Provides a link to launch an interactive Python shell. ```html >__ Launch Interactive Shell ``` -------------------------------- ### Lint Python.org Code Source: https://github.com/python/pythondotorg/blob/main/README.md Apply linting to the codebase to check for style guide violations and potential errors. This command helps maintain code consistency. ```bash make lint ``` -------------------------------- ### Form Structure with
      ,
      , and