~pcardune/+junk/zope3class

« back to all changes in this revision

Viewing changes to lore/lesson06/src/zcontact/browser.py

  • Committer: Paul Carduner
  • Date: 2007-03-03 08:19:41 UTC
  • Revision ID: pcardune@brownian-20070303081941-d3c2fb603e465c45

added lesson06.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
import zope.security.proxy
 
3
 
 
4
class ContactView(object):
 
5
    """View for showing and modifying a contact"""
 
6
    def __init__(self, context, request):
 
7
        self.context = context
 
8
        self.request = request
 
9
 
 
10
        if self.request.get("SAVE"):
 
11
            context = zope.security.proxy.removeSecurityProxy(self.context)
 
12
            context.lastName = self.request.get("lastName")