This is a template repository to set up a repository for development of pluggable Django applications.
-
Create a new repository on GitHub, using this as the template. Do not include all branches. Give the repository a matching name, by convention Django applications are named
django-[appname]
. -
Clone the repository to your local machine
$ git clone [REPO URL] $ cd django-[appname]
-
You should find yourself on the
development
branch. Create your actual release branch now (to keep things tidy).$ git branch main
-
Setup the
pre-commit
hooks:$ make util/pre-commit/install
-
Time to convert the template into your very own app. Start by replacing all occurences of
t3mpl4t3
with fitting values (this will be your[appname]
for most cases).$ git checkout -b chore-template-adjustment $ git mv t3mpl4t3 [appname] $ git commit -am "Rename actual app directory"
This command sequence will create a new branch, rename the actual app directory and commit the change. Now to the files! The following command will find all occurences of
t3mpl4t3
and should suffice as a reference.$ make util/repo/template
Replace all occurences, until the make recipe results in an empty output.
Pay special attention to
.github/workflows/ci-release.yml
. In this file the occurence oft3mpl4t3
has to be replaced with the name of your release branch (see step 3).It is highly recommended to go file by file and commmit on every updated file.
-
When completed, push the branch to GitHub, raise a pull request, let the CI finish and then "squash merge" from GitHub's web interface.
Then use
$ git fetch $ git checkout development $ git merge --ff origin/development
-
Finished, go ahead and create something special!