> ## Documentation Index
> Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python + Django - Starter Template

> Deploy a starter template Python app using the Django framework on Aptible

<CardGroup cols={3}>
  <Card title="Deploy Now" icon="rocket" href="https://app.aptible.com/create" />

  <Card title="GitHub Repo" icon="github" href="https://github.com/aptible/template-django" />

  <Card title="View Example" icon="browser" href="https://app-52709.on-aptible.com/" />
</CardGroup>

# Overview

This guide will walk you through the process of launching a [Python](https://www.python.org/) app using the [Django](https://www.djangoproject.com/) framework.

# Deploy Template

<Info> Prerequisite: Ensure you have [Git](https://git-scm.com/downloads) installed.</Info>

Using the [Deploy Code](https://app.aptible.com/create) tool in the Aptible Dashboard, you can deploy the **Django Template**. The tool will guide you through the following:

<Steps>
  <Step title="Deploy with Git Push">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django1.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=0e18c03c0590c5f184cfa9065828e978" alt="" width="2000" height="1000" data-path="images/django1.png" />
  </Step>

  <Step title="Add an SSH key">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django2.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=dded35dce07acbc81b922f4e2792662b" alt="" width="2000" height="1000" data-path="images/django2.png" />

    If you have not done so already, you will be prompted to set up an [SSH key](/core-concepts/security-compliance/authentication/ssh-keys#ssh-keys).
  </Step>

  <Step title="Environment Setup">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django3.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=805399b4dc39e1380ee75cc3cc1c729f" alt="" width="2000" height="1000" data-path="images/django3.png" />

    Select your [stack](/core-concepts/architecture/stacks) to deploy your resources. This will determine what region your resources are deployed to. Then, the name the [environment](/core-concepts/architecture/environments) your resources will be grouped into.
  </Step>

  <Step title="Prepare the template">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django4.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=af86bae61187b7b4fff5036daace7dfd" alt="" width="2000" height="1000" data-path="images/django4.png" />

    Select **Django Template** for deployment, and follow command-line instructions.
  </Step>

  <Step title="Fill environment variables and deploy!">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django5.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=2f3e10f543ef01d7eeeca62429e26755" alt="" width="2000" height="1000" data-path="images/django5.png" />

    Aptible will automatically fill this template's required databases, services, and app's configuration with environment variable keys for you to fill with values. Once complete, save and deploy the code!

    Aptible will stream the logs to you in live time:

    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django6.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=66d30a7afbd6ac1184fb365bbcf7465a" alt="" width="2000" height="1000" data-path="images/django6.png" />
  </Step>

  <Step title="Expose your app to the internet">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django7.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=ab2ff50e4cf3501be1046d294dca3b28" alt="" width="2000" height="1000" data-path="images/django7.png" />

    Now that your code is deployed, it's time to expose your app to the internet. Select the service that needs an [endpoint](/core-concepts/apps/connecting-to-apps/app-endpoints/overview), and Aptible will automatically provision a managed endpoint.
  </Step>

  <Step title="View your deployed app" icon="party-horn">
    <img src="https://mintcdn.com/aptible/2c_c-XH-dAzVOaDu/images/django8.png?fit=max&auto=format&n=2c_c-XH-dAzVOaDu&q=85&s=ad5683908065e1d28b20bf1fd9abf54c" alt="" width="2000" height="1000" data-path="images/django8.png" />
  </Step>
</Steps>

# Continue your journey

<Card title="Deploy custom code" icon="books" iconType="duotone" href="https://www.aptible.com/docs/custom-code-quickstart">
  Read our guide for deploying custom code on Aptible.
</Card>
