tbrlpld / flaskr

Flask based blog app build as an extended version of the official Flask tutorial.

Home Page:https://flask.palletsprojects.com/en/1.1.x/tutorial/#tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flaskr

This is my working repository for the Flask tutorial.

The basic functionality of the blog was created by following along the tutorial snippets.

My own work really starts with the implementation of the features listed in the Keep Developing Section of the tutorial. The added features are: detail post view, likes, comments, tags, title search, pagination, image upload, markdown formatting and RSS feed.

It is definitely not pretty, but that was not the point of the exercise.

Development

Installation

Clone the repo to a local directory.

$ git clone git@github.com:tbrlpld/flaskr.git

Change in to the flaskr directory and create a virtual environment and activate it.

$ cd flaskr
$ python -m venv .venv
$ source .venv/bin/activate

Install the app (in editable mode) and its dependencies.

$ python -m pip install -e '.[dev]'

Initialize the database.

$ export FLASK_APP=flaskr
$ export FLASK_ENV=development
$ flask init-db

Run the app.

$ flask run

Tests

To run the tests just run pytest in the project directory.

$ pytest

You can also run the tests and get a coverage report.

$ pytest --cov

About

Flask based blog app build as an extended version of the official Flask tutorial.

https://flask.palletsprojects.com/en/1.1.x/tutorial/#tutorial

License:MIT License


Languages

Language:Python 86.4%Language:HTML 9.1%Language:CSS 2.7%Language:TSQL 1.9%