Mercurial > wikked
comparison manage.py @ 55:494f3c4660ed
Various changes:
- Debug Flask app is also serving wiki assets (images, etc.) in `/files`.
- Now using Mustache to render pages when there are template parameters.
- Added a more user-friendly error message for circular includes.
- Fixed initialization problems where the wiki would always initially use the
default Flask logger before we got a change to configure it.
- Fixed some problems with queries.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 04 Feb 2013 21:19:10 -0800 |
parents | 8167b9b6925a |
children | 13249e5ca51c |
comparison
equal
deleted
inserted
replaced
54:9dfbc2a40b71 | 55:494f3c4660ed |
---|---|
1 | 1 |
2 # Configure a simpler log format. | 2 # Configure a simpler log format. |
3 from wikked import settings | 3 from wikked import settings |
4 settings.LOG_FORMAT = "[%(levelname)s]: %(message)s" | 4 settings.LOG_FORMAT = "[%(levelname)s]: %(message)s" |
5 settings.UPDATE_WIKI_ON_START = False | |
5 | 6 |
6 # Create the app and the wiki. | 7 # Create the app and the wiki. |
7 from wikked.web import app, wiki | 8 from wikked.web import app, wiki |
8 from wikked.page import Page | 9 from wikked.page import Page |
9 from wikked.db import conn_scope | 10 from wikked.db import conn_scope |
63 | 64 |
64 @manager.command | 65 @manager.command |
65 def get(url): | 66 def get(url): |
66 """ Gets a page that matches the given URL. | 67 """ Gets a page that matches the given URL. |
67 """ | 68 """ |
68 page = wiki.getPage(url) | 69 with conn_scope(wiki.db): |
69 print page.text | 70 page = wiki.getPage(url) |
71 print page.text | |
70 | 72 |
71 | 73 |
72 if __name__ == "__main__": | 74 if __name__ == "__main__": |
73 manager.run() | 75 manager.run() |