This updates django to the latest LTS version (1.11), and bumps the gulp
version while we're at it.
This commit is contained in:
Johnny Stenback 2019-08-14 11:59:14 -07:00
Родитель 31923f3e80
Коммит c79240c32a
9 изменённых файлов: 1921 добавлений и 1722 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -20,3 +20,4 @@ static/dist/
cookie
lib
env_vars.yaml
package-lock.json

Просмотреть файл

@ -34,9 +34,10 @@ Create a file named `env_vars.yaml` in the root directory and fill it with:
env_variables:
DJANGO_SETTINGS_MODULE: 'settings'
FIREBASE_SERVER_KEY: <SERVER_KEY>
DJANGO_SECRET: <django_key>
```
The `FIREBASE_SERVER_KEY` is the Firebase server key obtained from the [Firebase console](https://firebase.corp.google.com/project/cr-status/settings/cloudmessaging/).
The `FIREBASE_SERVER_KEY` is the Firebase server key obtained from the [Firebase console](https://firebase.corp.google.com/project/cr-status/settings/cloudmessaging/). The `DJANGO_SECRET` should be a unique value (e.g. an UUID), and if possible maintained across deployments.
##### FCM setup

Просмотреть файл

@ -29,7 +29,11 @@ import models
from django.template.loader import render_to_string
from django.utils import feedgenerator
import django
# Initialize django so that it'll function when run as a standalone script.
# https://django.readthedocs.io/en/latest/releases/1.7.html#standalone-scripts
django.setup()
def require_whitelisted_user(handler):
"""Handler decorator to require the user be whitelisted."""

Просмотреть файл

@ -1,6 +1,7 @@
import logging
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@ -15,4 +16,4 @@ def inline_file(path):
content = f.read()
except IOError, e:
logging.error('inline_file cannot read file - ' + str(e))
return content
return mark_safe(content)

Просмотреть файл

@ -2,160 +2,192 @@ indexes:
# AUTOGENERATED
# This index.yaml is automatically updated whenever the Cloud Datastore
# emulator detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the "# AUTOGENERATED" marker line above.
# If you want to manage some indexes manually, move them above the marker line.
# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED"). If you want to manage some indexes
# manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.
- kind: "Feature"
- kind: AnimatedProperty
properties:
- name: "impl_status_chrome"
- name: "shipped_milestone"
- name: bucket_id
- name: date
- kind: AnimatedProperty
properties:
- name: bucket_id
- name: date
direction: desc
- name: "name"
- kind: "Feature"
- kind: AnimatedProperty
properties:
- name: "impl_status_chrome"
- name: date
- name: day_percentage
direction: desc
- name: "shipped_milestone"
- kind: Feature
properties:
- name: category
- name: updated
direction: desc
- name: "name"
- kind: "AnimatedProperty"
- kind: Feature
properties:
- name: "bucket_id"
- name: "date"
- kind: "AnimatedProperty"
properties:
- name: "bucket_id"
- name: "date"
- name: category
- name: updated
direction: desc
- kind: "AnimatedProperty"
- name: name
- kind: Feature
properties:
- name: "date"
- name: "day_percentage"
- name: impl_status_chrome
- name: name
- kind: Feature
properties:
- name: impl_status_chrome
- name: name
direction: desc
- kind: "Feature"
- kind: Feature
properties:
- name: "category"
- name: "updated"
- name: impl_status_chrome
- name: shipped_milestone
- name: name
- kind: Feature
properties:
- name: impl_status_chrome
- name: shipped_milestone
direction: desc
- kind: "Feature"
- name: name
- kind: Feature
properties:
- name: "category"
- name: "updated"
- name: impl_status_chrome
- name: shipped_milestone
direction: desc
- name: "name"
- kind: "Feature"
properties:
- name: "impl_status_chrome"
- name: "name"
- kind: "Feature"
properties:
- name: "impl_status_chrome"
- name: "name"
- name: name
direction: desc
- kind: "Feature"
- kind: Feature
properties:
- name: "impl_status_chrome"
- name: "shipped_milestone"
- name: "name"
- kind: "Feature"
properties:
- name: "impl_status_chrome"
- name: "shipped_milestone"
- name: impl_status_chrome
direction: desc
- name: "name"
- name: shipped_milestone
direction: desc
- kind: "Feature"
- name: name
- kind: Feature
properties:
- name: "name"
- name: "updated"
- kind: "Feature"
- name: name
- name: updated
- kind: Feature
properties:
- name: "name"
- name: "updated"
- name: name
- name: updated
direction: desc
- kind: "Feature"
- kind: Feature
properties:
- name: "sample_links"
- name: "updated"
- name: sample_links
- name: updated
direction: desc
- kind: "Feature"
- kind: Feature
properties:
- name: "shipped_milestone"
- name: "name"
- kind: "Feature"
- name: shipped_milestone
- name: name
- kind: Feature
properties:
- name: "shipped_milestone"
- name: "shipped_android_milestone"
- name: shipped_milestone
- name: shipped_android_milestone
direction: desc
- name: "name"
- kind: "Feature"
- name: name
- kind: Feature
properties:
- name: "shipped_milestone"
- name: shipped_milestone
direction: desc
- name: "name"
- kind: "Feature"
- name: name
- kind: Feature
properties:
- name: "shipped_milestone"
- name: shipped_milestone
direction: desc
- name: "name"
- name: "impl_status_chrome"
- kind: "Feature"
- name: name
- name: impl_status_chrome
- kind: Feature
properties:
- name: "shipped_milestone"
- name: shipped_milestone
direction: desc
- name: "name"
- name: "impl_status_chrome"
- name: name
- name: impl_status_chrome
direction: desc
- kind: "Feature"
- kind: Feature
properties:
- name: "updated"
- name: updated
direction: desc
- name: "name"
- kind: "FeatureObserver"
- name: name
- kind: FeatureObserver
properties:
- name: "bucket_id"
- name: "date"
- kind: "FeatureObserver"
- name: bucket_id
- name: date
- kind: FeatureObserver
properties:
- name: "bucket_id"
- name: "date"
- name: bucket_id
- name: date
direction: desc
- kind: "FeatureObserver"
- kind: FeatureObserver
properties:
- name: "date"
- name: "day_percentage"
- name: date
- name: day_percentage
direction: desc
- kind: "FeatureOwner"
- kind: FeatureOwner
properties:
- name: "blink_components"
- name: "name"
- kind: "FeatureOwner"
- name: blink_components
- name: name
- kind: FeatureOwner
properties:
- name: "primary_blink_components"
- name: "name"
- kind: "StableInstance"
- name: primary_blink_components
- name: name
- kind: StableInstance
properties:
- name: "bucket_id"
- name: "date"
- kind: "StableInstance"
- name: bucket_id
- name: date
- kind: StableInstance
properties:
- name: "bucket_id"
- name: "date"
- name: bucket_id
- name: date
direction: desc
- kind: "StableInstance"
- kind: StableInstance
properties:
- name: "bucket_id="
- name: "date"
- name: bucket_id=
- name: date
direction: desc
- kind: "StableInstance"
- kind: StableInstance
properties:
- name: "date"
- name: "day_percentage"
- name: date
- name: day_percentage
direction: desc
- kind: "StableInstance"
- kind: StableInstance
properties:
- name: "date"
- name: "hits"
- name: date
- name: hits
direction: desc

Просмотреть файл

@ -30,7 +30,7 @@
"eslint-config-google": "^0.9.1",
"grunt": "^1.0.3",
"grunt-appengine": "^0.1.5",
"gulp": "^4.0.0",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^5.0.0",
"gulp-babel": "^7.0.1",
"gulp-crisper": "^1.1.0",

Просмотреть файл

@ -1,2 +1,2 @@
Django==1.4
beautifulsoup4
Django==1.11
beautifulsoup4

Просмотреть файл

@ -8,9 +8,14 @@ INSTALLED_APPS = (
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
TEMPLATE_DIRS = (
os.path.join(ROOT_DIR, 'templates')
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(ROOT_DIR, 'templates')],
'APP_DIRS': True,
},
]
################################################################################
if (os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine') or
@ -24,6 +29,8 @@ TEMPLATE_DEBUG = DEBUG
APP_TITLE = 'Chrome Platform Status'
SECRET_KEY = os.environ['DJANGO_SECRET']
APP_VERSION = os.environ['CURRENT_VERSION_ID'].split('.')[0]
MEMCACHE_KEY_PREFIX = APP_VERSION # For memcache busting on new version
@ -33,6 +40,8 @@ VULCANIZE = True #PROD
DEFAULT_CACHE_TIME = 600 # seconds
USE_I18N = False
if DEBUG:
TEMPLATE_CACHE_TIME = 0
else:

3367
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу