https://github.com/tbrlpld/flaskr
Flask based blog app build as an extended version of the official Flask tutorial.
https://github.com/tbrlpld/flaskr
blog flask flask-tutorial python
Last synced: about 1 month ago
JSON representation
Flask based blog app build as an extended version of the official Flask tutorial.
- Host: GitHub
- URL: https://github.com/tbrlpld/flaskr
- Owner: tbrlpld
- License: mit
- Created: 2019-09-26T20:37:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-05T03:55:15.000Z (almost 6 years ago)
- Last Synced: 2026-03-02T02:30:04.937Z (3 months ago)
- Topics: blog, flask, flask-tutorial, python
- Language: Python
- Homepage: https://flask.palletsprojects.com/en/1.1.x/tutorial/#tutorial
- Size: 143 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Flaskr
======
This is my working repository for the [Flask tutorial](https://flask.palletsprojects.com/en/1.1.x/tutorial/#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](https://flask.palletsprojects.com/en/1.1.x/tutorial/next/) 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.
```shell
$ git clone git@github.com:tbrlpld/flaskr.git
```
Change in to the `flaskr` directory and create a virtual environment and activate it.
```shell
$ cd flaskr
$ python -m venv .venv
$ source .venv/bin/activate
```
Install the app (in editable mode) and its dependencies.
```shell
$ python -m pip install -e '.[dev]'
```
Initialize the database.
```shell
$ export FLASK_APP=flaskr
$ export FLASK_ENV=development
$ flask init-db
```
Run the app.
```shell
$ flask run
```
### Tests
To run the tests just run `pytest` in the project directory.
```shell
$ pytest
```
You can also run the tests and get a coverage report.
```shell
$ pytest --cov
```