CodeStar Blog is a Django blog application with authentication, post publishing, comment moderation, and an About page with a collaboration request form.
- Post listing with pagination
- Draft and published post workflow
- Post detail pages with comments
- Comment create/edit/delete for signed-in users
- Admin moderation for comments
- About page content managed from the database
- Collaboration request form
- Cloudinary image hosting for posts and profile images
- Django Allauth authentication flow
- Python 3.12
- Django 4.2
- PostgreSQL (production)
- SQLite (automatically used during tests)
- Cloudinary + dj3-cloudinary-storage
- Django Summernote editor
- Django Crispy Forms with Bootstrap 5
- Gunicorn + WhiteNoise
git clone <your-repository-url>
cd codestar_blogWindows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1macOS/Linux:
python -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate an env.py file in the project root with:
import os
os.environ.setdefault("SECRET_KEY", "your-secret-key")
os.environ.setdefault("DATABASE_URL", "sqlite:///db.sqlite3")
os.environ.setdefault("CLOUDINARY_URL", "your-cloudinary-url")Notes:
- DATABASE_URL is required by settings.py
- In production, use a PostgreSQL URL for DATABASE_URL
- Keep real values out of version control
python manage.py migratepython manage.py createsuperuserpython manage.py runserverOpen:
- Home page: http://127.0.0.1:8000/
- Admin: http://127.0.0.1:8000/admin/
- About page: http://127.0.0.1:8000/about/
- / -> blog index
- // -> post detail
- /accounts/ -> authentication routes (Allauth)
- /about/ -> About + collaboration form
- /admin/ -> Django admin
- Log in to /admin/
- Open Posts
- Add title, slug, content, featured image, excerpt, and status
- Set status to Published to show on the site
- Open Comments in /admin/
- Approve comments you want to display publicly
Run all tests:
python manage.py testRun app-specific tests:
python manage.py test blog
python manage.py test about- Procfile is configured to run Gunicorn:
web: gunicorn codestar.wsgi
- runtime.txt pins Python:
python-3.12.3
- Required environment variables in deployment:
- SECRET_KEY
- DATABASE_URL
- CLOUDINARY_URL
about/ About page and collaboration request app
blog/ Blog posts, comments, and related views/forms
codestar/ Project settings and root URL configuration
templates/ Shared templates and allauth templates
static/ Source static assets
staticfiles/ Collected static assets
This project was created as part of the Code Institute learning curriculum.