Chromium Code Reviews| Index: reviewbot/model/app_config.py |
| =================================================================== |
| --- reviewbot/model/app_config.py (revision 0) |
| +++ reviewbot/model/app_config.py (revision 0) |
| @@ -0,0 +1,20 @@ |
| +# Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from google.appengine.ext import ndb |
| + |
| + |
| +class AppConfig(ndb.Model): |
| + """Application configuration data.""" |
| + client_id = ndb.TextProperty() |
| + service_account_key = ndb.TextProperty() |
| + server_url = ndb.TextProperty() |
| + nickname = ndb.TextProperty() |
| + |
| + |
| +def get(): |
| + config = ndb.Key(AppConfig, 'config').get() |
| + if config is None: |
| + config = AppConfig(id = 'config') |
|
agable
2013/08/02 16:35:35
nit: no spaces around = in function calls and defi
Mattias Nissler (ping if slow)
2013/08/05 09:08:51
Done.
agable
2013/08/05 17:38:00
There are some other instances of this in rietveld
Mattias Nissler (ping if slow)
2013/08/05 18:40:47
Fixed. (I'm surprised pylint doesn't catch those!)
|
| + return config |
| Property changes on: reviewbot/model/app_config.py |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |