def __call__(self):

        request = current.request
        response = current.response

        view = path.join(request.folder, "modules", "templates",
                         THEME, "views", "contact.html")
        try:
            # Pass view as file not str to work in compiled mode
            response.view = open(view, "rb")
        except IOError:
            from gluon.http import HTTP
            raise HTTP(404, view % "Unable to open Custom View: %s")

        if request.env.request_method == "POST":
            # Processs Form
            vars = request.post_vars
            result = current.msg.send_email(
                    #to=current.deployment_settings.get_mail_approver(),
                    to="admin@drrprojects.net",
                    subject=vars.subject,
                    message=vars.message,
                    reply_to=vars.address,
                )
            if result:
                response.confirmation = "Thankyou for your message - we'll be in touch shortly"

        #T = current.T

        # form = FORM(TABLE(
                        # TR(LABEL("Your name:",
                              # SPAN(" *", _class="req"),
                              # _for="name")),
                        # TR(INPUT(_name="name", _type="text", _size=62, _maxlength="255")),
                        # TR(LABEL("Your e-mail address:",
                              # SPAN(" *", _class="req"),
                              # _for="address")),
                        # TR(INPUT(_name="address", _type="text", _size=62, _maxlength="255")),
                        # TR(LABEL("Subject:",
                              # SPAN(" *", _class="req"),
                              # _for="subject")),
                        # TR(INPUT(_name="subject", _type="text", _size=62, _maxlength="255")),
                        # TR(LABEL("Message:",
                              # SPAN(" *", _class="req"),
                              # _for="name")),
                        # TR(TEXTAREA(_name="message", _class="resizable", _rows=5, _cols=62)),
                        # TR(INPUT(_type="submit", _value="Send e-mail")),
                        # ),
                   # _id="contact-form"
                   # )
        s3 = response.s3
        if s3.cdn:
            if s3.debug:
                s3.scripts.append("http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.js")
            else:
                s3.scripts.append("http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js")

        else:
            if s3.debug:
                s3.scripts.append("/%s/static/scripts/jquery.validate.js" % request.application)
            else:
                s3.scripts.append("/%s/static/scripts/jquery.validate.min.js" % request.application)
        s3.jquery_ready.append(
'''$('#contact-form').validate({
 errorClass:'req',
 rules:{
  name:{
   required:true
  },
  subject:{
   required:true
  },
  message:{
   required:true
  },
  name:{
   required:true
  },
  address: {
   required:true,
   email:true
  }
 },
 messages:{
  name:"Enter your name",
  subject:"Enter a subject",
  message:"Enter a message",
  address:{
   required:"Please enter a valid email address",
   email:"Please enter a valid email address"
  }
 },
 errorPlacement:function(error,element){
  error.appendTo(element.parents('tr').prev().children())
 },
 submitHandler:function(form){
  form.submit()
 }
})''')

        response.title = "Contact | DRR Project Portal"
        return dict(
                #form=form
            )

# =============================================================================
dataset/ETHPy150Open sahana/eden/modules/templates/DRRPP/controllers.py/contact.__call__/swapped operands of `%`