This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.
publish message to foo channel from user nickname.
$ python pub.py foo nickname
PUBLISH to channel #foo
| from votr import db, Polls, votr | |
| db.app = votr | |
| db.init_app(votr) | |
| db.create_all() | |
| from votr import Polls | |
| from models import Options, Topics, Polls | |
| topic = Topics(title='Which side is going to win the EPL this season') | |
| arsenal = Options(name='Arsenal') | |
| spurs = Options(name='Spurs') | |
| poll = Polls(topic=topic, option=arsenal) |
| # WSGI Handler sample configuration file. | |
| # | |
| # Change the appropriate settings below, in order to provide the parameters | |
| # that would normally be passed in the command-line. | |
| # (at least conf['addons_path']) | |
| # | |
| # For generic wsgi handlers a global application is defined. | |
| # For uwsgi this should work: | |
| # $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py | |
| # |
| """ | |
| Generates tests | |
| to check all forms/fields in a template for corresponding error messages. | |
| """ | |
| import re | |
| from os import walk | |
| from os.path import join |
| Using MongoDB in golang with mgo |