Skip to content

allanberger/deck-flask-gae

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

We are currently migrating our projects from django to flask. Since we also intend to use flask for entirely new projects, it made sense to save on initial setup time. So we created a project skeleton which includes some of the things (libs and configuration) that we pick for most projects.

Components

General

here is a list of assembled components

  • flask decorators for (cache_page, login_required)
  • gae specific monkeypatch for werkzeug debugger http://dev.pocoo.org/projects/werkzeug/wiki/UsingDebuggerWithAppEngine
  • a simple user model
  • google appengine specific development/production environment switch
  • google appengine appstats configured
  • google appengine memcache caching backend configured
  • favicon.ico stub to avoid unneeded error logs
  • deck module with 26 char uuid generator
  • deck module with JsonProperty for the datastore
  • lib directory for external dependencies prepended to syspath

Libraries

Python

Javascript

  • jQuery 1.4.2 (loaded async from google servers)
  • Facebook Javascript SDK (loaded async from facebook servers)

Dependencies

General

Testing

Setup

  • fetch all the submodules via:

    git submodule update --init

  • set your own appengine application id in app.yaml

  • change the 'secret_key' in settings.py

  • add facebook configuration to settings.py

Usage

Run Application

Go to path "code" and run

dev_appserver.py .

Run Test Enviroment

Go to path "code" and run

nosetests-2.5 --with-gae tests/

Run Remote Console

Go to path "code" and run

python2.5 appengine_console.py <app-id>

TODO

things we still need to extract and clean up from other projects

  • set port for testing via configuration in settings or test_settings
  • kill subprocess dev_appserver for selenium tests also in windows (see python2.6 implementation how to kill a process)
  • facebook auth via oauth2 redirection (for mobile support)
  • add coverage
  • add csrf
  • move style to css file
  • make js unobtrusiv
  • add fixture (http://farmdev.com/projects/fixture/using-fixture-with-appengine.html)

About

Flask skeleton for Google App Engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published