comparison MoinMoin/items/content.py @ 1910:78b7a1136984

use constants in MoinMoin.constans.{item,content}types more
author Cheer Xiao <xiaqqaix@gmail.com>
date Thu, 17 Jan 2013 17:45:41 +0800
parents 77d7c15299c9
children b97f0a329819
comparison
equal deleted inserted replaced
1901:77d7c15299c9 1910:78b7a1136984
61 from MoinMoin.util.crypto import cache_key 61 from MoinMoin.util.crypto import cache_key
62 from MoinMoin.util.clock import timed 62 from MoinMoin.util.clock import timed
63 from MoinMoin.forms import File 63 from MoinMoin.forms import File
64 from MoinMoin.constants.contenttypes import ( 64 from MoinMoin.constants.contenttypes import (
65 GROUP_MARKUP_TEXT, GROUP_OTHER_TEXT, GROUP_IMAGE, GROUP_AUDIO, GROUP_VIDEO, 65 GROUP_MARKUP_TEXT, GROUP_OTHER_TEXT, GROUP_IMAGE, GROUP_AUDIO, GROUP_VIDEO,
66 GROUP_DRAWING, GROUP_OTHER, 66 GROUP_DRAWING, GROUP_OTHER, CONTENTTYPE_NONEXISTENT,
67 ) 67 )
68 from MoinMoin.constants.keys import ( 68 from MoinMoin.constants.keys import (
69 NAME, NAME_EXACT, WIKINAME, CONTENTTYPE, SIZE, TAGS, HASH_ALGORITHM 69 NAME, NAME_EXACT, WIKINAME, CONTENTTYPE, SIZE, TAGS, HASH_ALGORITHM
70 ) 70 )
71 71
279 279
280 280
281 @register 281 @register
282 class NonExistentContent(Content): 282 class NonExistentContent(Content):
283 """Dummy Content to use with NonExistent.""" 283 """Dummy Content to use with NonExistent."""
284 contenttype = 'application/x-nonexistent' 284 contenttype = CONTENTTYPE_NONEXISTENT
285 group = None 285 group = None
286 286
287 def do_get(self, force_attachment=False, mimetype=None): 287 def do_get(self, force_attachment=False, mimetype=None):
288 abort(404) 288 abort(404)
289 289