Tornado-start is a template for building a Tornado web application in 5 minutes.
- python 2.7
- pip 1.3
- virtualenv 1.9
All you have to do is to:
-
clone this repository
git clone https://github.com/guillaumevincent/tornado-start.git PROJECT_DIR_NAME
-
move into PROJECT_DIR_NAME folder
cd PROJECT_DIR_NAME/
-
delete .git/ folder and license file
rm -rf .git/ LICENSE
-
rename tornado_start folder by YOUR_APPLICATION_NAME
mv tornado_start/ YOUR_APPLICATION_NAME/
-
rename APPLICATION_NAME = 'YOUR_APPLICATION_NAME' in settings.py
-
rename import in runserver.py
from tornado_start.handlers import Index
become
from YOUR_APPLICATION_NAME.handlers import Index
- mkdir ~/.env/
- virtualenv ~/.env/YOUR_APPLICATION_NAME/
- . ~/.env/YOUR_APPLICATION_NAME/bin/activate
- pip install -r requirements.txt
- python runserver.py
Add some test_xxx.py files in test folder and run tests with runtests.py
you can :
-
add some python libraries you use in requirements.txt
-
configure your deploy/fabfile.py file for deployment in production
-
add some alias in your .profile:
alias venvYOUR_APPLICATION_NAME='. ~/.env/YOUR_APPLICATION_NAME/bin/activate'
alias cdYOUR_APPLICATION_NAME='. ~/workspace/YOUR_APPLICATION_NAME/'
-
add some LICENSE file
-
init git repository
git init .
Tornado-start is under MIT License. See LICENSE file for more information
1.0.0