예제 #1
0
파일: routes.py 프로젝트: songokunr1/IBS
def backup_structure_of_db():
    form = GetNameForBackupForm()
    if form.validate_on_submit():
        all_records = Activity.json_all()
        Template.create_new_record_from_template(name=form.backup_name.data,
                                                 instances=all_records)
        return redirect(url_for('backup_structure_of_db'))
    return render_template('backup.html', form=form)
예제 #2
0
파일: routes.py 프로젝트: songokunr1/IBS
def get_activity():
    return jsonify(Activity.json_all())
예제 #3
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     self.all_cat = Activity.json_all()
     self.activity_id.choices = [(single['id'], single['name'])
                                 for single in self.all_cat]