예제 #1
0
 def delete_confirm(self, classified_id):
     if not contact_is_admin(session['username']):
         return abort(404)
     return render_template('delete-confirm.html', classified_id=classified_id,
                            classified=view_classified(classified_id))
예제 #2
0
 def view_classified(self, id):
     if classified_exists_in_db(id):
         return render_template("view_classified.html", classified=view_classified(id))
     else:
         error_message = "That classified id number doesn't exist in the classifieds database."
         return render_template("error_page.html", error=error_message)