Changeset 2420 in products for quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps
- Timestamp:
- May 31, 2010 6:44:23 PM (14 years ago)
- Location:
- quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/newssitemapview.py
r2416 r2420 23 23 ('access', lambda x:x.gsm_access or ""), 24 24 ('genres', lambda x:x and ", ".join(x.gsm_genres) or ""), 25 ('stock', lambda x:x.gsm_stock or ""), 25 26 ) 26 27 -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/templates/newssitemapview.pt
r2415 r2420 21 21 <n:keywords tal:condition="result/keywords" tal:content="result/keywords"> 22 22 Business, Mergers, Acquisitions</n:keywords> 23 <n:stock_tickers tal:condition="result/stock" tal:content="result/stock">NASDAQ:A, NASDAQ:B</n:stock_tickers> 23 24 </n:news> 24 25 </url> -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/content/newsextender.py
r2419 r2420 5 5 6 6 from Products.Archetypes.public import SelectionWidget 7 from Products.Archetypes.public import StringWidget 7 8 from Products.Archetypes.public import MultiSelectionWidget 8 9 from Products.Archetypes.public import LinesField … … 16 17 """An extendable string field.""" 17 18 18 access_lst = ("", "Subscription", "Registration")19 genres_lst = ("", "PressRelease","Satire","Blog","OpEd","Opinion","UserGenerated")19 access_lst = ["Subscription", "Registration"] 20 genres_lst = ["PressRelease","Satire","Blog","OpEd","Opinion","UserGenerated"] 20 21 21 22 class NewsExtender(object): … … 25 26 ExtendableStringField("gsm_access", 26 27 accessor="gsm_access", 27 vocabulary=DisplayList(zip( access_lst,access_lst)),28 vocabulary=DisplayList(zip(["",]+access_lst, ["Open access",]+access_lst)), 28 29 default="", 29 30 schemata="GoogleSitemap", … … 47 48 format="checkbox"), 48 49 ), 50 ExtendableStringField("gsm_stock", 51 accessor="gsm_stock", 52 default="", 53 schemata="GoogleSitemap", 54 widget = StringWidget( 55 label="Stock Tickers", 56 description="A comma-separated list of up to 5 stock tickers "\ 57 "of the companies, mutual funds, or other financial entities "\ 58 "that are the main subject of the article. Relevant primarily "\ 59 "for business articles. Each ticker must be prefixed by the "\ 60 "name of its stock exchange, and must match its entry in "\ 61 "Google Finance. For example, \"NASDAQ:AMAT\" (but not "\ 62 "\"NASD:AMAT\"), or \"BOM:500325\" (but not \"BOM:RIL\").", 63 size=70), 64 ), 49 65 ] 50 66
Note: See TracChangeset
for help on using the changeset viewer.