Project tutorial

Build a Django Blog

Build Campus Press, an original Django blog for Free Computer Courses: apps, templates, models, the admin, registration, login, profiles, CRUD posts, pagination, password reset, and a deploy-minded snapshot.

  • Difficulty Intermediate
  • Parts 12
  • Stack Python, Django, SQLite, Pillow, Crispy Forms

How this project works

Campus Press is a teaching blog you build in small, complete steps. Each numbered folder in fcc-django-blog is a working Django project at that stage of the curriculum. Clone once, open any snapshot, and run it without finishing every earlier part first.

If you already know a little Python—functions, classes, and how to run a script—you have enough to start. Django will feel bigger than a microframework at first, so each part explains the ideas in plain language before asking you to run code. You will see why a project and an app are separate, what a URL pattern does, and how models connect to the admin and to your templates.

The path mirrors a classic full-featured blog build: project setup, apps and routes, templates and static files, models plus admin, user registration, login and logout, profile pictures, profile updates, create/edit/delete for posts, pagination, password reset email flow, then environment-based settings for deploy. Later snapshots keep the same overall shape so you can compare folders and see what changed.

Code in this project is original Free Computer Courses material for Campus Press. It is not a copy of third-party Django tutorial repositories. Use it alongside the Python and SQL courses when you want deeper practice on language or database topics that appear along the way. If you already finished Build a Flask Blog, expect familiar features with Django’s project layout and class-based views.

Work in a virtual environment for every snapshot, install from the repo-root requirements.txt, and treat each part’s “what you should see” notes as your checkpoint. When something fails, the troubleshooting sections cover the mistakes beginners hit most often with Django: wrong folder, inactive venv, missing migrations, and ALLOWED_HOSTS or static-file surprises after deploy prep.

Start with part 1 Open GitHub repo

Parts in order

Work through the parts in sequence. Each lesson explains the ideas in plain language, then points you to a complete runnable snapshot on GitHub for that stage.

  1. Part 1: Getting StartedInstall Django in a virtual environment and run the default project home page.
  2. Part 2: Apps and RoutesCreate a blog app, wire URL patterns, and return simple views.
  3. Part 3: TemplatesRender Django templates with a shared base layout, home feed, and about page.
  4. Part 4: Models and AdminDefine a Post model, run migrations, and manage posts in Django admin.
  5. Part 5: User RegistrationAdd a users app and a registration form with validation and flashed messages.
  6. Part 6: Login and LogoutUse Django’s auth views for login and logout, and protect pages with login_required.
  7. Part 7: Profiles and ImagesAdd a one-to-one Profile model with an image field and show avatars on posts.
  8. Part 8: Update ProfileLet logged-in users edit username, email, and profile image with model forms.
  9. Part 9: Posts CRUDCreate, update, and delete posts with class-based views and ownership checks.
  10. Part 10: PaginationPaginate the home feed and per-user post lists with Django’s Paginator.
  11. Part 11: Password ResetAdd Django’s password-reset email flow with console email backend for learning.
  12. Part 12: DeployRead secrets from the environment and prepare Campus Press for hosting.