Mercurial > getan
comparison getan.py @ 53:1d63ab21b8af
add add_project method
currently the view isn't updated after a new project is created.
the new project isn't shown immediately. only after a restartd of getan
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 04 Apr 2011 12:23:55 +0200 |
parents | a5439795ef09 |
children | 34a0f5c533bd |
comparison
equal
deleted
inserted
replaced
52:9cb57c37369a | 53:1d63ab21b8af |
---|---|
142 self.backend.insert_project_entry(project, datetime.now(), desc) | 142 self.backend.insert_project_entry(project, datetime.now(), desc) |
143 self.update_entries(project) | 143 self.update_entries(project) |
144 self.update_project_list() | 144 self.update_project_list() |
145 logger.debug('Still running projects: %r' % self.running) | 145 logger.debug('Still running projects: %r' % self.running) |
146 | 146 |
147 def add_project(self, key, description): | |
148 if not key or not description: | |
149 return | |
150 self.backend.insert_project(key, description) | |
151 self.update_project_list() | |
152 | |
147 def shutdown(self): | 153 def shutdown(self): |
148 for project in self.running: | 154 for project in self.running: |
149 self.stop_project() | 155 self.stop_project() |
150 | 156 |
151 | 157 |