Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: appengine/findit/gae_libs/model/versioned_config.py

Issue 2488113005: [Findit] Re-org code. (Closed)
Patch Set: Rebase. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Versioned singleton entity with the global configuration.""" 5 """Versioned singleton entity with the global configuration."""
6 6
7 import logging 7 import logging
8 8
9 from google.appengine.ext import ndb 9 from google.appengine.ext import ndb
10 10
11 from model.versioned_model import VersionedModel 11 from gae_libs.model.versioned_model import VersionedModel
12 12
13 13
14 class VersionedConfig(VersionedModel): 14 class VersionedConfig(VersionedModel):
15 """Singleton entity with the global configuration of the service. 15 """Singleton entity with the global configuration of the service.
16 16
17 All changes are stored in the revision log. 17 All changes are stored in the revision log.
18 """ 18 """
19 19
20 # When this revision of configuration was created. 20 # When this revision of configuration was created.
21 updated_ts = ndb.DateTimeProperty(indexed=False, auto_now=True) 21 updated_ts = ndb.DateTimeProperty(indexed=False, auto_now=True)
(...skipping 19 matching lines...) Expand all
41 setattr(self, k, v) 41 setattr(self, k, v)
42 dirty = True 42 dirty = True
43 43
44 if dirty: 44 if dirty:
45 user_name = user.email().split('@')[0] 45 user_name = user.email().split('@')[0]
46 self.updated_by = user_name 46 self.updated_by = user_name
47 self.Save() 47 self.Save()
48 logging.info('Config %s was updated by %s', self.__class__, user_name) 48 logging.info('Config %s was updated by %s', self.__class__, user_name)
49 49
50 return dirty 50 return dirty
OLDNEW
« no previous file with comments | « appengine/findit/gae_libs/model/test/versioned_model_test.py ('k') | appengine/findit/gae_libs/model/versioned_model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698