Skip to content

mannar-hielal/WROTE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WROTE

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 ⭐

What's in it?

It contains the following features:

  1. Post model
  2. Comment model with replies
  3. Pagination
  4. Share post by email (SMTP)
  5. Multi-language (django-modeltranslation)
  6. Tags (django-taggit)
  7. Similar posts at the end of each post (template tags)
  8. Latest post wrote (template tags)
  9. Most commented post (template tags)
  10. Search (django.contrib.postgres)
  11. Sitemap (django.contrib.sites)

Installation

Assuming you have Python 3.8 installed

  1. Clone the project
    git clone https://github.com/mannar-hielal/WROTE

  2. Rename .env.dist to .env and add this line at the bottom of .env
    DATABASE_URL=postgresql://postgres:postgres@localhost:5432/db_blog

  3. Step into newly created wrote directory:
    cd wrote

  4. Install all the required dependencies:
    pip install -r requirements.txt

  5. 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;

  6. Exit the psql shell:
    \q

  7. Run the migration to create database schema:
    python manage.py migrate

  8. Create a user so you can login to the admin:
    python manage.py createsuperuser

  9. Run your local server:
    python manage.py runserver

  10. Browse the app at http://127.0.0.1:8000/

  11. Add contents by going to the admin panel http://127.0.0.1:8000/admin/

You're done 🥳