Table of Contents
Here’s how to install Django in less than 60 seconds using UV. I am using Ubuntu and the command-line to achieve this in lightning fast time. Check it out.
Install UV on Ubuntu using snap. If you don’t have snap installed, do this first:
sudo apt update
sudo apt install snapd
sudo apt update
sudo snap install astral-uv --classic
Now UV is installed we can start the Django installation process.
Let’s make a working directory and change to it using the command-line:
mkdir project
cd project
And this is where the magic begins! Initialise UV in the working directory.
uv init
Install Django in our project directory:
uv add django
No need to create a virtual environment, it’s done for you already. Take a look:
ls -la
We are good to go!
Let’s create our django project:
uv run django-admin startproject app .
Above, we ran django-admin with the startproject command using UV to create a project simply called app in the current directory (using the . after the project name)
Check out your new Django project, it’s all there!
ls
Let’s take it for a spin! At the command-line type:
uv run manage.py runserver
Open your web browser, go to: localhost:8000 and you should see the Django start page.
And that took me less than 60 seconds at my typing speed. However, even finger-typing you are only looking at a few minutes at most. Django installed and in the browser with just a few quick and easy terminal commands.
I have only scratched the surface of what can be done using UV in your workflow. If you want to find out more about UV, check out the links below.
I hope you found this useful.