Coder Social home page Coder Social logo

shivamswarnkar / ourblogs Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 138 KB

A light weight flask blogging web app for sharing common interests.

Home Page: https://ourblogs.herokuapp.com

Python 28.60% CSS 2.14% HTML 69.22% Procfile 0.04%
python flask webapp blogging-site flask-bcrypt flask-mail flask-login flask-wtf sqlalchemy

ourblogs's Introduction

OurBlogs

A light weight blogging app for sharing common knowledge and interests. Sign Up Here

About

OurBlogs is a flask powered webapp which allows users to create/update account, add/update/delete posts and share. It uses Flask-Login for handling user sessions along with Flask-Bcrypt for secure token generation. User can also request password reseting through email verification (implemented using Flask-Mail).

How to Run locally

First clone this repo & install all the dependencies.

$ git clone https://github.com/shivamswarnkar/ourblogs.git
$ cd ourblogs
$ pip install -r requirements.txt

Once everything is installed successfully, you should follow one of the following methods.

First Method (setup environment variables) You need to add following env variables. You can generate new SECRET_KEY using python's secrets.token_hex(16)

  • SECRET_KEY
  • SQLALCHEMY_DATABASE_URI
  • MAIL_USERNAME
  • MAIL_PASSWORD

Recommendations: set SQLALCHEMY_DATABASE_URI='sqlite:///site.db'

Second Method (edit flaskblog/config.py) First use python's secrets module to generate a SECRET_KEY

>>> import secrets
>>> token = secrets.token_hex(16)

Now set following vars in flaskblog/config.py If you want to use mail services then enter your correct informations for mail username and password.

SECRET_KEY = token #generated in previous step
SQLALCHEMY_DATABASE_URI = 'sqlite:///site.db'
MAIL_USERNAME = '[email protected]' 
MAIL_PASSWORD = 'YOUR_EMAIL_PASSWORD' 

Now simply run following

$ python run.py

Your local server should be running. By default server not run on debug mode and use host=0.0.0.0 (in other words, it'll be visible on your private network. Edit routes and templates however you want.

Note: Procfile is for Heroku deployment.

Dependencies

  • bcrypt==3.1.7
  • blinker==1.4
  • cffi==1.12.3
  • Click==7.0
  • Flask==1.1.1
  • Flask-Bcrypt==0.7.1
  • Flask-Login==0.4.1
  • Flask-Mail==0.9.1
  • Flask-SQLAlchemy==2.4.0
  • Flask-WTF==0.14.2
  • gunicorn==19.9.0
  • itsdangerous==1.1.0
  • Jinja2==2.10.1
  • MarkupSafe==1.1.1
  • Pillow==6.1.0
  • pycparser==2.19
  • six==1.12.0
  • SQLAlchemy==1.3.5
  • Werkzeug==0.15.4
  • WTForms==2.2.1

ourblogs's People

Contributors

dependabot[bot] avatar shivamswarnkar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.