~pcardune/+junk/zope3class

« back to all changes in this revision

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

  • Committer: Paul Carduner
  • Date: 2007-03-03 01:26:56 UTC
  • mfrom: (61.1.9 zope3class)
  • Revision ID: pcardune@brownian-20070303012656-6b8544b3136e733c
merging in published version after deleting their copy of the source code as it seemed totally messed up.

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")