Changeset 3152 in products for quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/content/newsextender.py
- Timestamp:
- Apr 20, 2011 8:20:36 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/content/newsextender.py
r2746 r3152 13 13 from quintagroup.plonegooglesitemaps.interfaces import INewsSitemapProvider 14 14 15 15 16 class ExtendableStringField(ExtensionField, StringField): 16 17 """An extendable string field.""" 18 17 19 18 20 class ExtendableLinesField(ExtensionField, LinesField): … … 20 22 21 23 access_lst = ["Subscription", "Registration"] 22 genres_lst = ["PressRelease","Satire","Blog","OpEd","Opinion","UserGenerated"] 24 genres_lst = ["PressRelease", "Satire", "Blog", "OpEd", "Opinion", \ 25 "UserGenerated"] 26 23 27 24 28 class NewsExtender(object): … … 29 33 ExtendableStringField("gsm_access", 30 34 accessor="gsm_access", 31 vocabulary=DisplayList(zip(["",]+access_lst, ["Open access",]+access_lst)), 35 vocabulary=DisplayList(zip(["", ] + access_lst, \ 36 ["Open access", ] + access_lst)), 32 37 default="", 33 38 schemata="GoogleSitemap", 34 widget =SelectionWidget(39 widget=SelectionWidget( 35 40 label="Access", 36 description="Specifies whether an article is available to all" \37 " readers (in case of the emtpy field, or only to those" \38 " with a free or paid membership to your site.",41 description="Specifies whether an article is available to " \ 42 "all readers (in case of the emtpy field, or only to " \ 43 "those with a free or paid membership to your site.", 39 44 format="radio"), 40 45 ), … … 44 49 schemata="GoogleSitemap", 45 50 default=(), 46 widget =MultiSelectionWidget(51 widget=MultiSelectionWidget( 47 52 label="Genres", 48 53 description="Select one or more properties for an article, " \ 49 54 "namely, whether it is a press release, a blog post, an " \ 50 "opinion, an op-ed piece, user-generated content, or satire.", 55 "opinion, an op-ed piece, user-generated content, " \ 56 "or satire.", 51 57 format="checkbox"), 52 58 ), … … 55 61 default="", 56 62 schemata="GoogleSitemap", 57 widget =StringWidget(63 widget=StringWidget( 58 64 label="Stock Tickers", 59 65 description="A comma-separated list of up to 5 stock tickers "\ 60 "of the companies, mutual funds, or other financial entities "\ 61 "that are the main subject of the article. Relevant primarily "\ 62 "for business articles. Each ticker must be prefixed by the "\ 63 "name of its stock exchange, and must match its entry in "\ 64 "Google Finance. For example, \"NASDAQ:AMAT\" (but not "\ 65 "\"NASD:AMAT\"), or \"BOM:500325\" (but not \"BOM:RIL\").", 66 "of the companies, mutual funds, or other financial " \ 67 "entities that are the main subject of the article. " \ 68 "Relevant primarily for business articles. Each ticker " \ 69 "must be prefixed by the name of its stock exchange, " \ 70 "and must match its entry in Google Finance. " \ 71 "For example, \"NASDAQ:AMAT\" (but not \"NASD:AMAT\"), " \ 72 "or \"BOM:500325\" (but not \"BOM:RIL\").", 66 73 size=70), 67 74 ),
Note: See TracChangeset
for help on using the changeset viewer.