Skip to content

python-myway/ablog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ablog

DEMO

This project is hosted on pythonanywhere now.

Preview

preview

Introduction

Ablog is a Content Management System written in Python.😜

Ablog is a lightweight framework to build blogs for now maybe forever.

Ablog is not finished, more features to be implemented and more bugs to be fixed(hope not 😭 ).

It is powered by Python and Flask. 💕

Quick Start

NOTE: Ablog requires Python 3.7+.

# clone the project
git clone https://github.com/python-myway/ablog.git

# build a Python vitual environment
cd ablog
python3 -m venv venv

# activate the env and install requirements
source venv/bin/activate
pip3 install -r requirements.txt

# before you start the server, do some init.
mkdir logs
touch logs/ablog.log
flask initdb
flask fakedata

# then you can run locally.
flask run

# then access http://localhost:5000.
# there are some fake people using ablog.
# the default user and passwd pairs are {'admin0': 'admin0', 'admin1': 'admin1',...'admin4': 'admin4'}

Deploy

NOTE: the dir deploy have all the configs.

  • This blog will teach you how to deploy.

Features(some are to be implemented)

  • ☑️ signup/login
  • ☑️ add/delete/check articles/categories
  • ☑️ add/delete comments
  • ☑️ enable/disable comment
  • ☑️ follow/unfollow bloger
  • ☑️ full text search
  • ☑️ manage personal profile
  • ☑️ responsive website design
  • ☑️ support rich text
  • ☑️ deploy with Nginx and uwsgi
  • ☑️ Message notice
  • ☑️ signup confirm email(the email box not ready yet, still looking one)
  • ☑️ forget password / reset password
  • 🔲 user profile
  • 🔲 related articles recommended (based on similar category)
  • 🔲 UI enhance
  • 🔲 api
  • 🔲 role part

Tips

  • all configs are located in ablog/settings.py.
  • it's better to write a .flaskenv file in this dir, then put FLASK_ENV=development in the file or you can just type export FLASK_ENV=development in the cmd.
  • delete a category won't all articles tied in it, these articles will belong to Category(name=defalut, author=superadmin).
  • use whooshee.reindex() to manually create index for whooshee.

Thanks for