comparison manage.py @ 131:9d22cf4d2412

Massive change that should have been several smaller ones, but whatever: - URLs are not slugified anymore, just quoted. - `getPage` now raises an error if the page doesn't exist. - Fixed the Mercurial SCM provider to be able to commit new files. - Fixed various issues with meta-pages and new files. - Better exception classes. - Configurable default file extension, main page name, and templates folder. - New CLI command to cache the wiki. - A few other small fixes.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 01 Dec 2013 21:50:29 -0800
parents ace48040b01d
children f32af0888382
comparison
equal deleted inserted replaced
130:72e5f588f989 131:9d22cf4d2412
1
2 # Configure logging.
3 import logging
4 logging.basicConfig(level=logging.DEBUG)
1 5
2 # Configure a simpler log format. 6 # Configure a simpler log format.
3 from wikked import settings 7 from wikked import settings
4 settings.LOG_FORMAT = "[%(levelname)s]: %(message)s" 8 settings.LOG_FORMAT = "[%(levelname)s]: %(message)s"
5 settings.UPDATE_WIKI_ON_START = False 9 settings.UPDATE_WIKI_ON_START = False
47 """ 51 """
48 wiki.update(url, cache_ext_data=cache) 52 wiki.update(url, cache_ext_data=cache)
49 53
50 54
51 @manager.command 55 @manager.command
56 def cache():
57 """ Makes sure the extended cache is valid for the whole wiki.
58 """
59 wiki._cachePages()
60
61
62 @manager.command
52 def list(fs=False): 63 def list(fs=False):
53 """ Lists page names in the wiki. 64 """ Lists page names in the wiki.
54 """ 65 """
55 if fs: 66 if fs:
56 for pi in wiki.fs.getPageInfos(): 67 for pi in wiki.fs.getPageInfos():