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_delete` resource*
6:Author:
7 David Young
8"""
9from builtins import object
10import sys
11import os
12import khufu
14class models_transients_element_comments_delete(object):
15 """
16 The worker class for the models_transients_element_comments_delete module
18 **Key Arguments**
20 - ``log`` -- logger
21 - ``request`` -- the pyramid request
22 - ``elementId`` -- the specific element id requests (or False)
24 """
26 def __init__(
27 self,
28 log,
29 request,
30 elementId=False
31 ):
32 self.log = log
33 self.request = request
34 self.elementId = elementId
35 # xt-self-arg-tmpx
37 log.debug(
38 "instansiating a new 'models_transients_element_comments_delete' object")
40 return None
42 def close(self):
43 del self
44 return None
46 def delete(self):
47 """execute the delete method on the models_transients_element_comments_delete object
49 **Return**
51 - ``responseContent`` -- the reponse to send to the browser
53 """
54 self.log.debug('starting the ``delete`` method')
56 elementId = self.elementId
58 responseContent = "Response from <code>" + __name__ + "</code><BR><BR>"
59 if elementId:
60 responseContent = "%(responseContent)sThe element selected was </code>%(elementId)s</code>" % locals(
61 )
62 else:
63 responseContent = "%(responseContent)sResource Context selected (no element)" % locals(
64 )
66 self.log.debug('completed the ``delete`` method')
67 return responseContent
69 # xt-class-method