This repo contains a fully featured blog management service. It Offers these features:
- Admin panel for managing posts, users, comments, and contact Us messages
- Information and statistics about posts, such as total number of views, rating, and total share counts
- Integrated CKeditor to have rich text field for posts.
- user friendly admin panel, designed by Jazzmin Django package
- Google authentication
- Email verification and forgot passowrd flow
- Trigram to enable fuzzy search in PostgreSQL
for run and deploy the code. first put a .env file in the directory like .env.example
change the values of the fields within this file.
and then run these codes:
1. sudo docker compose build
2. sudo docker compose run --rm app sh -c "python manage.py makemigrations"
3. sudo docker compose run --rm app sh -c "python manage.py migrate"
Now we need to create a admin user for our app
4. sudo docker compose run --rm app sh -c "python manage.py createsuperuser"
answer to the questions that appear in the terminal
5. sudo docker compose up
For trigram search, the pg_term extention must be installed on postgres.
sudo docker compose run --rm app sh -c "python manage.py makemigrations --empty core"
in the created migration file edit it in this way:
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', <'name of the previous migration file'>),
]
operations = [
migrations.RunSQL("CREATE EXTENSION IF NOT EXISTS pg_trgm;"),
]