ZopeMag's mascot the ZOPE fish

  items={ '510-115' : {'title' : 'Econo Feeder', 
           'description' : 'These feeders are made in Taiwan from a
            light-weight metal with plastic ends, and have an
            anti-spill edge to prevent the birds from kicking the feed
            out of the tray. They have a wooden rollbar to prevent the
            birds from sitting on them.',
            'price' : 7.95 },

      '510-122' : {'title' : 'Hopper Feeder',
                   'description' : 'Need to go out of town for a few
                   days, and no one can feed your pigeons? Don\'t
                   worry, we now have the virtually spillproof hopper
                   feeder. Made from birch plywood it holds from 30 to
                   35 pounds of grain. Pigeons can get at the feed
                   through holes in the plexiglass cover, but will not
                   be able to kick out any feed.', 
                   'price' : 55.0},

      '510-007' : {'title' : 'Dust Free Bullet Waterer',
                   'description' : 'A favorite with many fanciers,
                   this drinker has a dust cover over each individual
                   drinking hole, to keep out the dirt and dust.',
                   'price' : 16.0},
      }
  # return requested item
  if id is not None:
      item=items.get(id)
      if item is None:
          # no item by that id
          return None
      # add an id field to the record
      item['id']=id
      return item

  # return all items
  results=[]
  for id, item in items.items():
      item['id']=id 
      results.append(item)
  return results



Home   Subscribe   FAQ   Contact   Write for us   Privacy Policy   Weekly News   PyZine   opensourcexperts.com  

Reproduction of material from any of ZopeMag's pages without prior written permission is strictly prohibited. Copyright 2003 - 2005 ZopeMag Zope/Plone hosting by Nidelven IT