Wellcome to Django Quest. Build Your First Django Project!
β οΈ Important:
This repository is a Template for the Django Quest.
Do not clone or fork this repo to do the exercises.
Instead, click Use this template β Create a new repository and work in your own copy.
Welcome to the Django Setup Quest β an interactive, automated, step-by-step journey where you build a fully working Django project using GitHub Issues, Branches, Pull Requests, and GitHub Actions CI.
Whether you're building a blog, a to-do app, an online shop, or your own idea β this Quest gives you the solid foundation for any Django project you start in the future.
- Python 3
- Django
- Virtual environments (
venv) - Settings, apps, URLs, models, migrations, templates, and admin
- Installing packages with
pip - Managing dependencies (
requirements.txt) - Understanding environment isolation
- Django ORM
- Models & migrations
- Django Admin
- URL routing
- Views
- Templates
- Rendering DB data
- Branching
- Commit hygiene
- Pull Requests
- CI checks
- Merging safely
- Click Use this template
- Select Create a new repository
- Name it anything you like
- Recommended: make it public
- Click Create repository
Automation cannot begin until Issue 1 exists.
- Go to your new repo
- Open Issues
- Click New Issue
- Choose:
Issue 1 β Setup Django & Dependencies - Submit Issue 1
π The Quest has officially begun.
π Click to view
Each Issue contains step-by-step instructions, screenshots, tips, and common mistakes for that specific task. Youβll find all the detailed explanations inside the Issues themselves β this section is just a quick overview of the workflow.Read the instructions carefully β the Issue explains exactly what to do and what the CI will check.
Must start with:
issue-X-
Examples:
issue-1-install-django
issue-3-create-app
issue-5-models
Please make sure you are working in the issue branch.
git add .
git commit -m "Completed Issue X"
git push -u origin issue-X-description
Base: main
Compare: issue-X-*
Closing each Issue automatically generates the next one.
π Click to expand
| Action | Command |
|---|---|
| Create branch | git checkout -b issue-X-name |
| Check changes | git status |
| Stage | git add . |
| Commit | git commit -m "message" |
| Push | git push -u origin issue-X-name |
| Switch | git checkout main |
| Update | git pull |
After merging:
git checkout main
git pull
β CI says "requirements.txt not found" (click to expand)
You probably forgot to create or commit requirements.txt.
Fix:
pip freeze --local > requirements.txt
git add requirements.txt
git commit -m "Add requirements file"
git pushThen reopen your PR page and wait for CI to re-run.
β CI says "Django is missing from requirements.txt"
You may have installed Django but didnβt regenerate requirements.txt.
Fix:
pip install "Django>=4.2,<6.0" # if not already installed
pip freeze --local > requirements.txt
git add requirements.txt
git commit -m "Ensure Django is in requirements"
git pushβ CI says "manage.py not found"
This usually means the project was created without the final dot:
django-admin startproject <project_name> .Fix:
- Remove any incorrect extra nested folders (if needed)
- Re-run:
django-admin startproject <project_name> .- Commit and push the new files:
git add manage.py <project_name>/
git commit -m "Fix project structure"
git pushβ CI says "Could not resolve root URL '/'"
Check these:
- You created
<app_name>/urls.pywith a pattern for""(empty path) - Your
<project_name>/urls.pyincludes your app URLs:
from django.urls import path, include
urlpatterns = [
path("admin/", admin.site.urls),
path("", include("<app_name>.urls")),
]Donβt forget to:
git add <app_name>/urls.py <project_name>/urls.py
git commit -m "Wire up root URL"
git pushβ CI failing on migrations
Run the commands locally to see the full error:
python manage.py makemigrations
python manage.py migrateCommon fixes:
- Check for typos in
models.py - Make sure your app is in
INSTALLED_APPS - Make sure you imported
modelscorrectly
After fixing:
git add <app_name>/models.py <app_name>/migrations/
git commit -m "Fix model and migrations"
git pushβ CI shows only a notice: "No Django Quest checks ran..."
This means your branch name is wrong.
It must start with:
issue-X-Examples that work:
issue-1-setup-djangoissue-3-blog-appissue-5-models
Examples that do not work:
issue1setup-issue-1my-branch
Create a correctly named branch and repeat the steps for that Issue.
You will build:
- A Django project
- A custom app
- URL routing
- Templates
- Models & migrations
- Admin + Superuser
- A complete backend foundation
Good luck β‘π§ββοΈ
If youβd like a full end-to-end explanation of how a Django project is created β including diagrams and all commands used in the Quest β check out the Django Setup Guide in the Wiki.
All help and Q&A happens in GitHub Discussions for this repo.
π Go to Discussions
Use:
- General β Chat about anything related to this Quest.
- Help & Support β if you're stuck on a Quest issue or wiki step
- Django & Python Concepts β to ask about explanations in the wiki
- Quest & Wiki Feedback β to suggest improvements
- Show Your Project β to share what you built π
Happy to help with debugging, installation issues, or anything in the Quest.