A full-featured blog platform built with Django, featuring a clean UI, post management, image support, and a custom CSS design system.
Features • Structure • Getting Started • Screenshots • Contributing
- 📄 Post Management — Create, edit, and publish blog posts with rich content
- 🖼️ Image Support — Upload and display images within posts via
images/post_images/ - 🎨 Custom Styling — Hand-crafted CSS design system located in
static/css/ - 🔧 Django Admin Panel — Full control over content through Django's built-in admin interface
- 🧩 Modular Architecture — Separated
blogapp andsabzwebproject config for clean organization - ⚡ Lightweight & Fast — No heavy frontend frameworks, just clean HTML/CSS/JS
Blog/
│
├── blog/ # Main blog application
│ ├── migrations/ # Database migrations
│ ├── templates/ # HTML templates for blog views
│ ├── admin.py # Admin panel configuration
│ ├── models.py # Post, Category, and other data models
│ ├── views.py # View logic for handling requests
│ └── urls.py # URL routing for blog endpoints
│
├── sabzweb/ # Django project configuration
│ ├── settings.py # Project settings (DB, apps, static files, etc.)
│ ├── urls.py # Root URL configuration
│ └── wsgi.py # WSGI entry point for deployment
│
├── static/
│ └── css/ # Custom stylesheets
│
├── images/
│ └── post_images/ # Uploaded post images
│
├── manage.py # Django management command entry point
└── .gitignore
Make sure you have the following installed:
- Python 3.8+
- pip
- Git
1. Clone the repository
git clone https://github.com/Arian-Zf/Blog.git
cd Blog2. Create and activate a virtual environment
# On Linux / macOS
python3 -m venv venv
source venv/bin/activate
# On Windows
python -m venv venv
venv\Scripts\activate3. Install dependencies
pip install django pillowIf a
requirements.txtis available:pip install -r requirements.txt
4. Apply database migrations
python manage.py migrate5. Create a superuser (for admin access)
python manage.py createsuperuser6. Run the development server
python manage.py runserverThe project settings are located in sabzweb/settings.py. Key settings you may want to customize:
| Setting | Description |
|---|---|
DATABASES |
Database backend (default: SQLite) |
STATIC_URL |
URL for serving static files |
MEDIA_URL / MEDIA_ROOT |
URL and path for uploaded images |
ALLOWED_HOSTS |
Hosts allowed to serve the application |
SECRET_KEY |
Django secret key — keep this private in production! |
For production deployment, consider the following steps:
- Set
DEBUG = Falseinsettings.py - Update
ALLOWED_HOSTSwith your domain - Use a production-grade database (PostgreSQL recommended)
- Serve static files via a web server (Nginx / Apache) or a CDN
- Use Gunicorn or uWSGI as the WSGI server
# Example with Gunicorn
pip install gunicorn
gunicorn sabzweb.wsgi:application| Technology | Purpose |
|---|---|
| Python 3 | Core language |
| Django | Web framework (MVC pattern) |
| SQLite | Development database |
| HTML5 | Template structure |
| CSS3 | Custom styling & layout |
| JavaScript | Frontend interactivity |
| Pillow | Image upload & processing |
Contributions are welcome! Here's how to get started:
- Fork this repository
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes and commit:
git commit -m "Add: your feature description" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
Please make sure your code follows the existing style and includes relevant comments where needed.
- Add user authentication (register / login)
- Add comment system for posts
- Implement post categories and tags
- Add pagination for post listings
- Add search functionality
- REST API support with Django REST Framework
- Responsive mobile layout improvements
This project is open source. Feel free to use, modify, and distribute it.
Made with ❤️ by Arian-Zf
⭐ If you found this project useful, consider giving it a star!