https://github.com/shivamswarnkar/ourblogs
A light weight flask blogging web app for sharing common interests.
https://github.com/shivamswarnkar/ourblogs
blogging-site flask flask-bcrypt flask-login flask-mail flask-wtf python sqlalchemy webapp
Last synced: 3 months ago
JSON representation
A light weight flask blogging web app for sharing common interests.
- Host: GitHub
- URL: https://github.com/shivamswarnkar/ourblogs
- Owner: shivamswarnkar
- Created: 2019-07-16T16:00:58.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T21:14:11.000Z (about 2 years ago)
- Last Synced: 2025-01-26T01:16:09.836Z (5 months ago)
- Topics: blogging-site, flask, flask-bcrypt, flask-login, flask-mail, flask-wtf, python, sqlalchemy, webapp
- Language: HTML
- Homepage: https://ourblogs.herokuapp.com
- Size: 135 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OurBlogs
A light weight blogging app for sharing common knowledge and interests. [Sign Up Here](https://ourblogs.herokuapp.com)
### 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