示例#1
0
 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")
示例#2
0
 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')
示例#3
0
    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")
示例#4
0
 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')
示例#5
0
 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')
示例#6
0
 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")
示例#7
0
 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")
示例#8
0
 def index(self):
     c.title = "Greetings"
     c.heading = "Sample Page"
     c.content = "This is page %s" % id
     return render("/derived//sample/index.mako")
示例#9
0
 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")
示例#10
0
 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')
示例#11
0
 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')
示例#12
0
 def list(self):
     return render('/derived/sample/list.mako')
示例#13
0
 def index(self):
     c.title = 'Greetings'
     c.heading = 'Sample Page'
     c.content = "This is page %s"%id
     return render('/derived//sample/index.mako')