Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1#!/usr/local/bin/python
2# encoding: utf-8
3"""
4*The HTML template module for the `models_transients_element_comments_put.py` resource*
6:Author:
7 David Young
8"""
9from builtins import object
10import sys
11import os
12import khufu
15class models_transients_element_comments_put(object):
16 """
17 The worker class for the models_transients_element_comments_put module
19 **Key Arguments**
21 - ``log`` -- logger
22 - ``request`` -- the pyramid request
23 - ``elementId`` -- the specific element id requests (or False)
25 """
27 def __init__(
28 self,
29 log,
30 request,
31 elementId=False
32 ):
33 self.log = log
34 self.request = request
35 self.elementId = elementId
36 # xt-self-arg-tmpx
38 log.debug(
39 "instansiating a new 'models_transients_element_comments_put' object")
41 return None
43 def close(self):
44 del self
45 return None
47 def put(self):
48 """execute the put method on the models_transients_element_comments_put object
50 **Return**
52 - ``responseContent`` -- the reponse to send to the browser
54 """
55 self.log.debug('starting the ``put`` method')
57 elementId = self.elementId
59 responseContent = "Response from <code>" + __name__ + "</code><BR><BR>"
60 if elementId:
61 responseContent = "%(responseContent)sThe element selected was </code>%(elementId)s</code>" % locals(
62 )
63 else:
64 responseContent = "%(responseContent)sResource Context selected (no element)" % locals(
65 )
67 self.log.debug('completed the ``put`` method')
68 return responseContent
70 # xt-class-method