Skip to content
🐍 A Hackernews clone in flask + python + sqlalchemy
Python HTML Mako CSS
Branch: master
Clone or download
Latest commit d714420 Jul 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
migrations Heroku deployment Dec 6, 2018
.gitignore cleanup Dec 6, 2018
LICENSE
Procfile
README.md updated readme Jul 20, 2019
config.py
flasknews.py changed names Dec 6, 2018
requirements.txt

README.md

flask_hackernews



flask_hackernews is a minimalistic hackernews clone.

Built so that beginners who want a hackernews-like application can quickly get to work.

Greatly inspired by the awesome flask megatutorial, one of the best ressources to learn more about flask.

It uses:

  • flask as a web framework.
  • flask-sqlalchemy as an ORM.
  • SQLite as a database.
  • heroku for a simple deployment.
  • Other less known libraries listed inrequirements.txt

Contents

Features

  • user authentication
  • upvoting on comments and posts
  • karma
  • user profiles
  • post ranking algorithms based on the 'official' one
  • comment replies, threading and more!

Set up Instructions

Follow these instructions if you wish to run this project locally

  • clone this repo
$ git clone https://github.com/duarteocarmo/flask_hackernews
  • create a virtual environment with the latest python version
  • install requirements
(venv) $ pip install -r requirements.txt
  • create a .env file in the home directory with the following structure
FLASK_APP=flasknews.py
SECRET_KEY = "yoursecretkey"
MAIL_ADMIN_ADDRESS = <admin_email_adress>
MAIL_SERVER = <admin_mail_server>
MAIL_PORT = <admin_mail_port>
MAIL_USE_TLS = 1
MAIL_USERNAME = <admin_email_adress>
MAIL_PASSWORD = <admin_email_password>
  • initiate your database
(venv) $ flask db init
(venv) $ flask db upgrade
  • πŸŽ‰Run!!πŸŽ‰
(venv) $ flask run

Deployment

Follow these instructions to deploy your to the 🌎

About

This project was built by duarteocarmo. If you have any questions, contact me!

You can’t perform that action at this time.