43 |
43 |
44 work.content: the rich-text contents of the Document |
44 work.content: the rich-text contents of the Document |
45 """ |
45 """ |
46 |
46 |
47 URL_NAME = 'document' |
47 URL_NAME = 'document' |
|
48 DOCUMENT_ACCESS = ['admin', 'restricted', 'member', 'user'] |
48 |
49 |
49 #: field storing the prefix of this document |
50 #: field storing the prefix of this document |
50 prefix = db.StringProperty(default='user', required=True, |
51 prefix = db.StringProperty(default='user', required=True, |
51 choices=['site', 'club', 'sponsor', 'program', 'org', 'user'], |
52 choices=['site', 'club', 'sponsor', 'program', 'org', 'user'], |
52 verbose_name=ugettext('Prefix')) |
53 verbose_name=ugettext('Prefix')) |
54 'Indicates the prefix of the document,' |
55 'Indicates the prefix of the document,' |
55 ' determines which access scheme is used.') |
56 ' determines which access scheme is used.') |
56 |
57 |
57 #: field storing the required access to read this document |
58 #: field storing the required access to read this document |
58 read_access = db.StringProperty(default='public', required=True, |
59 read_access = db.StringProperty(default='public', required=True, |
59 choices=['admin', 'restricted', 'member', 'user', 'public'], |
60 choices=DOCUMENT_ACCESS + ['public'], |
60 verbose_name=ugettext('Read Access')) |
61 verbose_name=ugettext('Read Access')) |
61 read_access.help_text = ugettext( |
62 read_access.help_text = ugettext( |
62 'Indicates the state of the document, ' |
63 'Indicates the state of the document, ' |
63 'determines the access scheme.') |
64 'determines the access scheme.') |
64 |
65 |
65 #: field storing the required access to write to this document |
66 #: field storing the required access to write to this document |
66 write_access = db.StringProperty(default='admin', required=True, |
67 write_access = db.StringProperty(default='admin', required=True, |
67 choices=['admin', 'restricted', 'member', 'user'], |
68 choices=DOCUMENT_ACCESS, |
68 verbose_name=ugettext('Write Access')) |
69 verbose_name=ugettext('Write Access')) |
69 write_access.help_text = ugettext( |
70 write_access.help_text = ugettext( |
70 'Indicates the state of the document, ' |
71 'Indicates the state of the document, ' |
71 'determines the access scheme.') |
72 'determines the access scheme.') |
72 |
73 |