Ignore:
Timestamp:
May 31, 2010 6:44:23 PM (14 years ago)
Author:
mylan
Message:

#131: Added 'stock_tickers' tag to newssitemap view, news extender schema

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/content/newsextender.py

    r2419 r2420  
    55 
    66from Products.Archetypes.public import SelectionWidget 
     7from Products.Archetypes.public import StringWidget 
    78from Products.Archetypes.public import MultiSelectionWidget 
    89from Products.Archetypes.public import LinesField 
     
    1617    """An extendable string field.""" 
    1718 
    18 access_lst = ("", "Subscription", "Registration") 
    19 genres_lst = ("", "PressRelease","Satire","Blog","OpEd","Opinion","UserGenerated") 
     19access_lst = ["Subscription", "Registration"] 
     20genres_lst = ["PressRelease","Satire","Blog","OpEd","Opinion","UserGenerated"] 
    2021 
    2122class NewsExtender(object): 
     
    2526        ExtendableStringField("gsm_access", 
    2627            accessor="gsm_access", 
    27             vocabulary=DisplayList(zip(access_lst, access_lst)), 
     28            vocabulary=DisplayList(zip(["",]+access_lst, ["Open access",]+access_lst)), 
    2829            default="", 
    2930            schemata="GoogleSitemap", 
     
    4748                format="checkbox"), 
    4849        ), 
     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        ), 
    4965    ] 
    5066 
Note: See TracChangeset for help on using the changeset viewer.