Skip to content

Ablesius/flask-website

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Website

The main website for https://archwomen.org

The github repo is a mirror of the official git repo at git @ archwomen.org

Installation

Install the packagse for python, flask, feedparser, pygments, markdown, dateutil, icalendar, bleach

Pip command:

pip install flask feedparser pygments markdown dateutil icalendar bleach

pacman:

pacman -S python-flask python-feedparser python-pygments python-markdown python-dateutil python-icalendar python-bleach

Run

On the server gunicorn service file is used to run the flask website but you can run a local test with export FLASK_APP=app.py; export FLASK_ENV=development; python -m flask run then go to localhost.localdomain:5000 to see the website.

To allow sessions on production a secret key enviromental variable should be set in the systemd service file running the site.

On the server this enviromental variable is set by doing the following:

systemctl edit gunicorn.service

Then you need to edit the file and add:

Environment="SECRET_KEY=mysupersecretekey"

Obviously with a different key. This key is used for storing the contact form capcha to validate it. Note that sessions should NOT be used for any information you actually need to keep secure.

Add Pages

Pages are written in markdown and saved in /content/pages with the .md file extension.

Todo

  • blog
  • blog archives
  • cache with frozen flask

About

The main archwomen.org website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.0%
  • Python 23.5%
  • CSS 11.6%
  • JavaScript 2.9%