def edit(self, **kw): sample_id = request.params["sample_id"] s = model.Sample().get(sample_id) s.id = sample_id c.sample = s c.sample_form = model.edit_sample_form c.now = datetime.datetime.utcnow() return render("/derived/sample/edit.mako")
def view(self, sample_id): c.heading = "Sample " + sample_id c.sample_form = model.sample_form s = model.Sample().get(sample_id) s.id = sample_id c.sample = s c.sample_id = sample_id c.sample_json = json.dumps(s.to_json()) return render('/derived/sample/view.mako')
def view(self, sample_id): c.heading = "Sample " + sample_id c.sample_form = model.sample_form c.properties_form = model.props_form c.preparation_form = model.preparation_form c.experiment_form = model.experiment_form s = model.Sample().get(sample_id) for r in s.seebeck_result: r.get_seebeck() s.id = sample_id c.sample = s c.process_form = model.process_form c.seebeck_form = model.seebeck_form c.note_form = model.note_form c.sample_id = sample_id c.sample_json = json.dumps(s.to_json()) return render("/derived/sample/view.mako")
def add(self, sample_id=False): c.sample_id = request.params['sample_id'] c.experiment_name = request.params['experiment_name'] c.experiment_form = model.experiment_form return render('/derived/experiment/add.mako')
def add(self, sample_id=False): c.sample_id = request.params['sample_id'] c.note_form = model.note_form return render('/derived/note/add.mako')
def bulk_add(self, **kw): c.sample_form = model.bulk_sample_form c.sample_id = int(model.Sample().get_max().first()["value"]) + 1 c.now = datetime.datetime.utcnow() return render("/derived/sample/add.mako")
def list(self): c.heading = "Romny Sample List" c.bulk_sample_form = model.bulk_sample_form c.sample_form = model.sample_form return render("/derived/sample/list.mako")
def index(self): c.title = "Greetings" c.heading = "Sample Page" c.content = "This is page %s" % id return render("/derived//sample/index.mako")
def add(self, sample_id=False): c.sample_id = request.params["sample_id"] c.process_form = model.process_form return render("/derived/process/add.mako")
def all(self, **kw): all_samps = model.Sample() all_samps.set_db(model.get_db()) c.samples = all_samps.view('sample/all').all() return render('/derived/sample/view.mako')
def add(self, **kw): c.sample_form = model.sample_form c.sample_id = int(model.Sample().get_max().first()['value']) + 1 return render('/derived/sample/add.mako')
def list(self): return render('/derived/sample/list.mako')
def index(self): c.title = 'Greetings' c.heading = 'Sample Page' c.content = "This is page %s"%id return render('/derived//sample/index.mako')