Skip to content

Instantly share code, notes, and snippets.

@mainroach
Last active April 9, 2017 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mainroach/92bc3dafd645d865935f7d3c53293f1d to your computer and use it in GitHub Desktop.
Save mainroach/92bc3dafd645d865935f7d3c53293f1d to your computer and use it in GitHub Desktop.
from google.appengine.ext import ndb
# a global variable
gCDNServer = None
def getCDN():
global gCDNServer
if gCDNServer==None:
gCDNServer = Settings.query(Settings.name == "gCDNServer").value
return gCDNServer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment