A simple blog app made with Python 3.8, django 3.0.6 & PostgreSQL 12
It is minimal styled, it could be a base of a bigger project.
If you find this useful please give this repository a star ⭐
It contains the following features:
- Post model
- Comment model with replies
- Pagination
- Share post by email (SMTP)
- Multi-language (django-modeltranslation)
- Tags (django-taggit)
- Similar posts at the end of each post (template tags)
- Latest post wrote (template tags)
- Most commented post (template tags)
- Search (django.contrib.postgres)
- Sitemap (django.contrib.sites)
Assuming you have Python 3.8 installed
-
Clone the project
git clone https://github.com/mannar-hielal/WROTE
-
Rename
.env.dist
to.env
and add this line at the bottom of.env
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/db_blog
-
Step into newly created
wrote
directory:
cd wrote
-
Install all the required dependencies:
pip install -r requirements.txt
-
Start the PostgreSQL database server and enter the psql shell (you need to have PostgreSQL installed:
CREATE DATABASE db_blog;
CREATE ROLE postgres;
GRANT ALL privileges ON DATABASE db_blog TO postgres;
ALTER ROLE postgres WITH LOGIN;
-
Exit the
psql
shell:
\q
-
Run the migration to create database schema:
python manage.py migrate
-
Create a user so you can login to the admin:
python manage.py createsuperuser
-
Run your local server:
python manage.py runserver
-
Browse the app at
http://127.0.0.1:8000/
-
Add contents by going to the admin panel
http://127.0.0.1:8000/admin/
You're done 🥳