Advanced web application based on Tornado.
v1.0.6-Beta
-
Non-blocking Network I/O
-
Session Support (Use Redis Storage)
-
Cookie(Secure Cookie) Support
-
MySQL Support
-
Redis Support
-
Jinja2 Support
-
Internationalization Support (i18n)
-
Python 2.6.6
-
Python 2.7.x
-
Python 3.x Not Test
- Tornado 4.0+
-
Bootstrap 3.3.7 (Not Limit)
-
Font-Awesome 4.7.0 (Not Limit)
-
jQuery 2.2.4 (Not Limit)
- Jinja2 2.9+
-
yum install MySQL-python
-
pip install tornado
-
pip install redis
-
pip install jinja2
python run.py
You can visit the site via http://YourIP:8081/
Specify Port:
python run.py --port=8080
You can config your MySQL and Redis via settings.py.
-
handler/YourHandler.py
Add import YourHandler to handler/init.py and add don't forget to add a route.
- view/YourHandler/YourTemplate.html
Support for Jinja2, you should do this:
from Template import TemplateLoader
tpl_loader = TemplateLoader(settings['template_path'], False)
tornado.web.Application.__init__(self, handlers, template_loader=tpl_loader.Loader(), **settings)
See the app/Torweb.py for the detail.
-
static/css
-
static/js
-
static/img
-
ui_modules/UIModules.py
-
view/ui_modules/YourUIModule.html
Via {{ module YourUIModule(foo) }} use ui modules in template.
Tips: Jinja2 don't support UI Modules
-
locale/en_US.csv
-
locale/YourLocale.csv
Via {{ _('Locale String') }} in your template
This project is under the MIT License. See the LICENSE file for the full license text.