Awesome
chaiproject
Collection of Python/JS libraries for a standard web project
Features
- Python ORM + MVC
- Session management and Routing (via python modules)
- User management - login / logout / register / forgot password
- JS form library
- Virtual (AJAX) views and manager
- Static (HTML) page generator for SEO
- Twitter Bootstrap CSS
- File upload management
- Email tools
Requirements
- MySQL
- Python Modules:
- mysql-python (mysqldb)
- markdown2 (for emails)
- html2text (for emails)
- requests
- webob
- WSGI web server
Start a new app
- start a new git repository
- add chaiproject as a submodule in "lib"
- use lib/py/chai.py startup scripts chai newapp
Sample App:
Web server
all requests are fed to the / of the url of execution set your server to handle / to app.py via wsgi
Sample nginx settings
# u-wsgi
location / {
include uwsgi_params;
uwsgi_pass unix:///tmp/myapp.sock;
}
# redirect index to / (there is no index.html)
rewrite /index.html / permanent;
# write condition to restrict conf, models, controllers, lib/py,
# lib/controllers, lib/models
location ~* /(conf|models|controllers|py) {
return 403;
}
License
MIT