Skip to content

saoili/metonymic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metonymic

Flask app that lists WordPress or Tumblr posts as a dictionary.

Local Development

Requirements:

  • Python
  • virtualenv
  • Postgres (or other local database)
  • foreman (or the Heroku Toolbelt)

Install local dependencies

$ virtulenv env
$ source env/bin/activate
$ pip install -r requirements.txt

Configure the app

$ cp .env.sample .env

Set your blog info (and, for Tumblr, API key) in the .env file.

Local Database

Create a local database:

$ createdb metonymic-dev

Set the DATABASE_URL appropriately in your .env file:

DATABASE_URL=postgresql://localhost/metonymic-dev

Load the local database schema:

$ foreman run python
>>> from metonymic import database
>>> database.init_db()

Then, do the initial load of blog info and posts (this might take a few minutes if you have many posts):

$ foreman run python
>>> from metonymic import helpers
>>> helpers.load_blog_info()
>>> helpers.load_posts()

Running the server

Start foreman, and visit your development server at http://localhost:5000

$ foreman start

Note: gunicorn prevents Flask from displaying a full trace. For debugging, it's easier to run Flask without gunicorn:

$ foreman run python runserver.py

About

Flask app that lists WordPress or Tumblr posts alphabetically

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 45.8%
  • Python 43.2%
  • HTML 11.0%