This is yet another boiler plate for flask, with bootstrap, redis & formencode.
-
Install Redis & Run server
-
Install latest formencode from Github
git clone git://github.com/formencode/formencode.git cd formencode python setup.py install
-
Clone flask-plate from Github.
git clone https://github.com/haje01/flask-plate.git
-
Rename 'flask-plate' folder as your project name, and cd into it.
-
Install required python modules. ( Make virtual environment beforehand, if you want to )
pip install -r requirements.txt
-
Find 'myapp's in the following files and change it into your own app's name.
./admin ./application.py ./myapp/config.py ./myapp/util.py ./myapp.uwsgi.xml ./myapp (change folder name)
-
Run application, then test 'http://localhost:8000' with you browser.
python application.py
-
If everything goes well, remove .git folder and init new repository for your project.
-
Edit as your own!
To unittest your application, modify tests.py
and run it. You can override settings by edit tests.cfg
file.
If you want to use Sphinx as document tool,
-
download latest Sphinx source and install (Note: current PIP version(1.2b) has timezone error).
wget https://bitbucket.org/birkenfeld/sphinx/get/default.zip python setup.py build python setup.py install
-
Move into
docs/
folder and init sphinx document root.sphinx-quickstart
-
If you have more than one language to support, make locale folder in
translations/
folder:mkdir -p translations/ko
Then extract message strings into
_build/locale
by:make gettext
And add
locale_dirs = ['translations']
to the end ofconf.py
Init .po files by
docs/babel-init
. After translations is done, compile them bydocs/babel-compile
.
In order to activate admin script's tab completion:
-
If you are using MacOSX, upgrade to bash 4.2 & install bash-completion.
http://techscienceinterest.blogspot.kr/2010/05/change-to-new-bash-shell-41-for-mac-os.html
http://blog.jeffterrace.com/2012/09/bash-completion-for-mac-os-x.html
-
Admin Command line Completion