File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
appengine/standard/modules Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1919
2020import urllib2
2121
22- # [START modules_import ]
22+ # [START gae_standard_modules_import ]
2323from google .appengine .api import modules
24+ # [END gae_standard_modules_import]
2425
25- # [END modules_import]
2626import webapp2
2727
2828
2929class GetModuleInfoHandler (webapp2 .RequestHandler ):
3030 def get (self ):
31- # [START module_info]
3231 module = modules .get_current_module_name ()
3332 instance_id = modules .get_current_instance_id ()
3433 self .response .write ("module_id={}&instance_id={}" .format (module , instance_id ))
35- # [END module_info]
3634
3735
3836class GetBackendHandler (webapp2 .RequestHandler ):
3937 def get (self ):
40- # [START access_another_module ]
38+ # [START gae_standard_modules_access_another_module ]
4139 backend_hostname = modules .get_hostname (module = "my-backend" )
4240 url = "http://{}/" .format (backend_hostname )
4341 try :
4442 result = urllib2 .urlopen (url ).read ()
4543 self .response .write ("Got response {}" .format (result ))
4644 except urllib2 .URLError :
4745 pass
48- # [END access_another_module ]
46+ # [END gae_standard_modules_access_another_module ]
4947
5048
5149app = webapp2 .WSGIApplication (
You can’t perform that action at this time.
0 commit comments