/flask-blog

My flask blog with some simple scrapers running in the background

Primary LanguagePythonMIT LicenseMIT

The app is under construction. Thank you for you patience.

flask-blog

A blog written with Flask with some scrapers running in the background

Description

The app has two parts: a blog and some scrapers.

I use it as my personal blog while scrapers are meant for personal use. But they could be used to make something similar to the django-dynamic-scraper.

Since the site is dynamic I use Flask-SQLAlchemy and PostgreSQL in production.

The app follows design patterns laid out by Miguel Grinberg (especially his book Flask Web Development and his talk PyCon 2014 talk Flask by Example) and cookiecutter-flask.

The app is written in Python 3.

Installation

  1. Create a virtual environment (use Virtual Enviroments or venv)

Example: python -m venv flask-blog

  1. Within your virtual environment folder (in this case flask-blog) create a folder named app

  2. Clone or copy this repository into this folder

  3. Run pip install -r requirements.txt

  4. Change the directory to flask-blog

  5. Execute python manage.py createsuperuser

  6. Run python manage.py runserver

Deploying

For this project I use Pythonanywhere. You can deploy your app using git or you could just upload your files from your profile. It's really straight forward and you have the option to edit you code using their online editor.

Since Jacob Kaplan-Moss mentioned that Python frameworks are in decline at Heroku (somewhere here) I added a procfile and use Gunicorn to make deploying to Heroku as easy as possible. Consult Heroku's instructions for installations.

For other deployment please see the respective instructions.

Misc

I am not using Flask-Boostrap, but I am using Boostrap and I build my style on top of it. If you don't want to be bothered with design, just use Flask-Bootstrap and remove the custom style.css.

It uses the flask-markdown and flask-pagedown extensions for editing

The other external libraries are: jQuery, moments.js (the moments + locales minified lib) and Boostrap datetime picker

If you have any suggestions, wishes or just some ideas contact me.