An open API service indexing awesome lists of open source software.

https://github.com/descent098/components-in-jinja

A helper repo for an article about using components in jinja-based web apps
https://github.com/descent098/components-in-jinja

blog demo web webdev webdevelopment

Last synced: 4 months ago
JSON representation

A helper repo for an article about using components in jinja-based web apps

Awesome Lists containing this project

README

          

# Components in Jinja

This repository is for the demo featured in https://kieranwood.ca/tech/blog/jinja-components/ it essentially walks through how to do a [component-based approach](https://medium.com/@arqex/what-is-component-driven-development-and-why-to-use-it-e3e57abbc449) to [jinja](https://jinja.palletsprojects.com/en/stable/) projects.

## How to run demos

To run each demo you must have python 3.10+ installed with pip. From there you can install the dependencies using:

```bash
pip install flask faker
```

This will install [flask](https://flask.palletsprojects.com/en/stable/) (and by extension [jinja](https://jinja.palletsprojects.com/en/stable/)), and [faker](https://pypi.org/project/Faker/).

You can then `cd` into either version and run `main.py` to run the demo. For the `jinja-version` this will produce an `index.html` file you can then open in your browser, and for the `flask-version` this will open a web app at http://localhost:9898