view MoinMoin/constants/ @ 2109:38b5c2746f83

raise minimum requirement to python 2.7 now that debian wheezy is stable (and thus even debian stable has python 2.7 - almost 3 years after the python 2.7 release), it is time to move on. there are some nice features in 2.7 - we can use them now: there is also no risk any more that language or library features creep in unnoticed that are incompatible with the minimum requirement. we also save some time as we don't have to test on / care for 2.6 any more. about this changeset: most should be self-explanatory, except this: MoinMoin/constants/ - we could not use unicode key constants yet due to a bug in pre-2.6.5 python that did not allow unicode keys in kwargs. The change in MoinMoin/storage/middleware/ is also related to that, we just had to make sure keys are str, not unicode as that dict later was exploded into a function call like f(**doc). notes for developers: if you developed on 2.6 until now, you need to create a fresh new virtualenv using python 2.7.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 04 May 2013 16:08:33 +0200
parents 15eafde0d14d
children 9c6013f454da 7fa2d72bcd1f 431815d4f4a6 74d2eafffa29
line wrap: on
line source
# Copyright: 2011 MoinMoin:ThomasWaldmann
# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.

MoinMoin - meta data key / index field name related constants

# metadata keys
NAME = u"name"
NAME_OLD = u"name_old"
NAMESPACE = u"namespace"

# if an item is reverted, we store the revision number we used for reverting there:
REVERTED_TO = u"reverted_to"

# some metadata key constants:
ACL = u"acl"

# keys for storing group and dict information
# group of user names, e.g. for ACLs:
USERGROUP = u"usergroup"
# needs more precise name / use case:
SOMEDICT = u"somedict"

CONTENTTYPE = u"contenttype"
ITEMTYPE = u"itemtype"
SIZE = u"size"
LANGUAGE = u"language"
EXTERNALLINKS = u"externallinks"
ITEMLINKS = u"itemlinks"
ITEMTRANSCLUSIONS = u"itemtransclusions"
TAGS = u"tags"

ACTION = u"action"
ADDRESS = u"address"
HOSTNAME = u"hostname"
USERID = u"userid"
MTIME = u"mtime"
EXTRA = u"extra"
COMMENT = u"comment"
SUMMARY = u"summary"

# we need a specific hash algorithm to store hashes of revision data into meta
# data. meta[HASH_ALGORITHM] = hash(rev_data, HASH_ALGORITHM)
# some backends may use this also for other purposes.
HASH_LEN = 40  # length of hex str representation of hash value

# some field names for whoosh index schema / documents in index:
NAME_EXACT = u"name_exact"
ITEMID = u"itemid"
REVID = u"revid"
PARENTID = u"parentid"
DATAID = u"dataid"
WIKINAME = u"wikiname"
CONTENT = u"content"

# magic REVID for current revision:
CURRENT = u"current"

# stuff from user profiles / for whoosh index
EMAIL = u"email"
OPENID = u"openid"
DISPLAY_NAME = u"display_name"
THEME_NAME = u"theme_name"
LOCALE = u"locale"
TIMEZONE = u"timezone"
ENC_PASSWORD = u"enc_password"
SUBSCRIBED_ITEMS = u"subscribed_items"
BOOKMARKS = u"bookmarks"
QUICKLINKS = u"quicklinks"
SESSION_KEY = u"session_key"
SESSION_TOKEN = u"session_token"
RECOVERPASS_KEY = u"recoverpass_key"
EDIT_ON_DOUBLECLICK = u"edit_on_doubleclick"
SCROLL_PAGE_AFTER_EDIT = u"scroll_page_after_edit"
SHOW_COMMENTS = u"show_comments"
MAILTO_AUTHOR = u"mailto_author"
CSS_URL = u"css_url"
EDIT_ROWS = u"edit_rows"
RESULTS_PER_PAGE = u"results_per_page"
WANT_TRIVIAL = u"want_trivial"
EMAIL_SUBSCRIBED_EVENTS = u"email_subscribed_events"
DISABLED = u"disabled"

# in which backend is some revision stored?
BACKENDNAME = u"backendname"

    # User objects proxy these attributes of the UserProfile objects:

# keys for blog homepages
LOGO = u"logo"
SUPERTAGS = u"supertags"
# keys for blog entries
PTIME = u"ptime"

# keys for tickets
EFFORT = u"effort"
DIFFICULTY = u"difficulty"
SEVERITY = u"severity"
PRIORITY = u"priority"
ASSIGNED_TO = u"assigned_to"
SUPERSEDED_BY = u"superseded_by"
DEPENDS_ON = u"depends_on"
CLOSED = u"closed"

# index names
LATEST_REVS = 'latest_revs'
ALL_REVS = 'all_revs'