Lines Matching refs:template
120 def getvalue(self, template):
121 val = self.index.get(tuple(template[k] for k in self.keys), None)
134 def updatevalue(self, template):
136 in template"""
137 orig = self.index[tuple(template[k] for k in self.keys)].copy()
139 if name in template:
140 orig[name] = template[name]
143 def setvalue(self, template):
148 if field not in template:
153 template[field] = self.default_values[field]()
155 template[field] = self.default_values[field]
157 orig = self.index.get(tuple(template[k] for k in self.keys), None)
166 line = self.valuetostr(template)
167 self.index[tuple(template[k] for k in self.keys)] = \
168 (line, template, lineno)
171 def removevalue(self, template):
172 del self.index[tuple(template[k] for k in self.keys)]
175 def valuetostr(self, template):
179 "{0}".format(template[key]) for key in self.column_names
246 def getvalue(self, template):
248 c = self.password_file.getvalue(template).copy()
249 c.update(self.shadow_file.getvalue(template))
252 def updatevalue(self, template):
253 copy = template.copy()
257 self.shadow_file.updatevalue(template)
259 def setvalue(self, template):
261 copy = template.copy()
265 self.shadow_file.setvalue(template)
267 def removevalue(self, template):
268 self.password_file.removevalue(template)
269 self.shadow_file.removevalue(template)
460 def valuetostr(self, template):
463 c = template.copy() # since we're mucking w/ this....