This guide will help you create a new project repository based on the starter Django project template. The template has been slightly modified from William Vincent’s DjangoX project to match recent best practices and includes UV integration while removing Docker support.
On GitHub
- Create a new repository (called 'my_new_project' hereafter). Do not initialize it with a README,
.gitignore, or license file—this will be handled locally.
On your local machine:
-
Clone the starter project without including its Git history:
git clone git@github.com:Copient-ai/django_start.git
-
Now clone your new project (in the same folder is assumed):
git clone git@github.com:Copient-ai/my_new_project.git
-
Copy all the files from django_start project to my_new_project EXCEPT the .git folder:
rsync -av --exclude='.git' django_start/ my_new_project/
-
Change the project name (and optionally the description) from cps to my_new_project in the pyproject.toml. Change this:
[project] name = "cps" version = "0.1.0" description = "Add your description here" ...To this:
[project] name = "my_new_project" version = "0.1.0" description = "Change if you want to..." ... -
Change the package name from cps to my_new_project in the uv.lock. Change this (about half-way down the length of the file):
[[package]] name = "cps" ...To this:
[project] [[package]] name = "my_new_project" ...
-
Initialize a new Git repository:
cd my_new_project git add . git commit -m "Initial commit based on django starter project files." git push
Sync your requirements using UV:
uv syncActivate the VM (the following assumes OhMyZsh):
vrun .venvIf you want to go ahead and set up PostgreSQL now is the time. If not, migrate as follows:
uv run manage.py migrateMake sure everything is set up. Run the server and you should see the django start page:
uv run manage.py runserverYou’re all set!