Hide keyboard shortcuts

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* 

5 

6:Author: 

7 David Young 

8""" 

9from builtins import object 

10import sys 

11import os 

12import khufu 

13 

14 

15class models_transients_element_comments_put(object): 

16 """ 

17 The worker class for the models_transients_element_comments_put module 

18 

19 **Key Arguments** 

20 

21 - ``log`` -- logger 

22 - ``request`` -- the pyramid request 

23 - ``elementId`` -- the specific element id requests (or False) 

24 

25 """ 

26 

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 

37 

38 log.debug( 

39 "instansiating a new 'models_transients_element_comments_put' object") 

40 

41 return None 

42 

43 def close(self): 

44 del self 

45 return None 

46 

47 def put(self): 

48 """execute the put method on the models_transients_element_comments_put object 

49 

50 **Return** 

51 

52 - ``responseContent`` -- the reponse to send to the browser 

53 

54 """ 

55 self.log.debug('starting the ``put`` method') 

56 

57 elementId = self.elementId 

58 

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 ) 

66 

67 self.log.debug('completed the ``put`` method') 

68 return responseContent 

69 

70 # xt-class-method