Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ CodeJournal

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.


πŸš€ Features

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

πŸ› οΈ Tech Stack

Layer Technology
Backend Django 6
Database PostgreSQL
Authentication Django Auth
Search PostgreSQL Trigram Search
Media Processing django-resized
Date System django-jalali

πŸ“ Project Structure

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

βš™οΈ Installation

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

πŸ” Backend Highlights

  • 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

πŸ“š Sample Data

The repository includes:

  • blog_data.json fixture data
  • Sample blog posts
  • User profiles
  • Media files for posts and accounts

Load the sample data with:

python manage.py loaddata blog_data.json

🀝 Contributing

Feedback, suggestions, and contributions are always appreciated. Feel free to open an issue or submit a pull request.

About

πŸ“ Backend-focused weblog built with Django and PostgreSQL.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages