Exemplo n.º 1
0
Arquivo: views.py Projeto: atdt/marcel
 def post(self):
     form = EntryForm()
     if form.validate():
         flash("Success")
         entry_manager = EntryManager(form.entry_type.data)
         entry_manager.add(
             user=g.user,
             summary=form.summary.data,
             details=form.details.data,
             contact_info=form.contact_info.data
         )
     else:
         flash("Error")
     return render_template('show_entries.html',
                            form=form,
                            offers=offers.all(),
                            requests=requests.all())
Exemplo n.º 2
0
Arquivo: views.py Projeto: atdt/marcel
 def get(self):
     form = EntryForm()
     return render_template('show_entries.html',
                            form=form,
                            offers=offers.all(),
                            requests=requests.all())