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_context_put.py` resource* 

5 

6:Author: 

7 David Young 

8""" 

9from builtins import object 

10import sys 

11import os 

12import khufu 

13 

14class models_transients_element_context_put(object): 

15 """ 

16 The worker class for the models_transients_element_context_put module 

17 

18 **Key Arguments** 

19 

20 - ``log`` -- logger 

21 - ``request`` -- the pyramid request 

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

23  

24 """ 

25 

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 

36 

37 log.debug( 

38 "instansiating a new 'models_transients_element_context_put' object") 

39 

40 return None 

41 

42 def close(self): 

43 del self 

44 return None 

45 

46 def put(self): 

47 """execute the put method on the models_transients_element_context_put object 

48 

49 **Return** 

50 

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

52  

53 """ 

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

55 

56 elementId = self.elementId 

57 

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 ) 

65 

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

67 return responseContent 

68 

69 # xt-class-method