OLD | NEW |
| (Empty) |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 from google.appengine.ext import ndb | |
6 | |
7 | |
8 class AppConfig(ndb.Model): | |
9 """Application configuration data.""" | |
10 client_id = ndb.TextProperty() | |
11 service_account_key = ndb.TextProperty() | |
12 server_url = ndb.TextProperty() | |
13 nickname = ndb.TextProperty() | |
14 | |
15 | |
16 def get(): | |
17 config = ndb.Key(AppConfig, 'config').get() | |
18 if config is None: | |
19 config = AppConfig(id='config') | |
20 return config | |
OLD | NEW |