https-jrtorres042-github-com
/
git_microsoft-powershell_achived-credential_terms-of-service_blog_covid-19_chromium-apis_sdks-diff-1
Public template
forked from GoogleChrome/chromium-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappengine_config.py
28 lines (22 loc) · 938 Bytes
/
appengine_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import os
import sys
# name of the django settings module
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
lib_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib')
from google.appengine.ext import vendor
vendor.add(lib_path) # add third party libs to "lib" folder.
# Add libraries to pkg_resources working set to find the distribution.
import pkg_resources
pkg_resources.working_set.add_entry(lib_path)
import six
reload(six)
# This is needed to use the requests library in python 2.7.
# https://cloud.google.com/appengine/docs/standard/python/issue-requests#requests
if (sys.version_info < (3, 0)):
import requests_toolbelt.adapters.appengine # noqa: E402
# Use the App Engine Requests adapter. This makes sure that Requests uses
# URLFetch.
requests_toolbelt.adapters.appengine.monkeypatch()