A backend-focused weblog application built with Django and PostgreSQL.
This project demonstrates authentication, content management, image handling, PostgreSQL-powered search, user profiles, and custom Django features commonly used in real-world applications.
| Feature | Description |
|---|---|
| π Authentication | User registration, login, logout and profile management |
| π Post Management | Create, edit and delete blog posts |
| πΌοΈ Image Handling | Multiple images per post with automatic resizing |
| ποΈ Media Cleanup | Automatic deletion of unused uploaded files |
| π¬ Comments | Comment system with moderation support |
| π Search | PostgreSQL TrigramSimilarity-based search |
| π Categories | Filter posts by category |
| π Pagination | Efficient post listing |
| π Custom Template Tags | Blog statistics and latest posts |
| βοΈ Markdown Support | Render Markdown content |
| π Jalali Dates | Persian date support using django-jalali |
| Layer | Technology |
|---|---|
| Backend | Django 6 |
| Database | PostgreSQL |
| Authentication | Django Auth |
| Search | PostgreSQL Trigram Search |
| Media Processing | django-resized |
| Date System | django-jalali |
Django-Weblog/
βββ Weblog/ # Project settings
βββ blog/
β βββ migrations/
β βββ templates/
β βββ static/
β βββ templatetags/
β βββ models.py
β βββ views.py
β βββ forms.py
βββ images/
β βββ account_images/
β βββ post_images/
βββ blog_data.json
βββ requirements.txt
βββ manage.py
git clone https://github.com/ShahabCode/Django-Weblog.git
cd Django-Weblog
pip install -r requirements.txt
python manage.py migrate
python manage.py loaddata blog_data.json
python manage.py createsuperuser
python manage.py runserver- Custom model manager (
PublishedManager) - PostgreSQL similarity search (
TrigramSimilarity) - Custom template tags and filters
- Automatic slug generation
- Image optimization and resizing
- Media cleanup using Django signals
- Form validation with custom clean methods
- User profile management with OneToOne relationships
The repository includes:
blog_data.jsonfixture data- Sample blog posts
- User profiles
- Media files for posts and accounts
Load the sample data with:
python manage.py loaddata blog_data.jsonFeedback, suggestions, and contributions are always appreciated. Feel free to open an issue or submit a pull request.