Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

davidrpk/FlaskGallery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Gallery

Getting Started

The photo index can be stored in a json file, an sqlite db, Azure table storage or extended for your own db type. The default is to use the sqlite db. The record structure is as follows:

{
  "objectID": "1",
  "imageUrl": "https://...",
  "thumbNail": "https:/...",
  "title": "Image A",
  "desc": "This is a photograph",
  "taken": "2018-01-01",
  "CRC": "0x7ED2A35C"
}

You can access this information using for each photo by using a for loop in Jinja.

{% for photo in photos %}
  <img src="{{photo.thumb}}" />
  <h4>{{photo.title}}</h4>
  <p>{{photo.year}}</p>
{% endfor %}

Running

Windows:

set FLASK_APP=flaskgallery.webapp
set FLASK_ENV=development
flask run

Unix/Mac:

export FLASK_APP=flaskgallery.webapp
export FLASK_ENV=development
flask run

About

Photo Gallery in Flask and Jinja2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 59.5%
  • Python 23.1%
  • HTML 17.4%