from flask import Blueprint
from flask import abort, flash, redirect, render_template, request, url_for
from flask.ext.login import current_user

from viaduct import application, db
from viaduct.helpers import flash_form_errors

from models import Activity

blueprint = Blueprint('activity', __name__)

# Overview of activities
@blueprint.route('/activities/', methods=['GET', 'POST'])
@blueprint.route('/activities/<int:page>/', methods=['GET', 'POST'])
def view(page=1):
	activities = Activity.query.paginate(page, 15, False)

	return render_template('activity/view.htm', activities=activity)

@blueprint.route('/create_activity/', methods=['GET', 'POST'])
def create():
	form = CreateForm(request.form)

	if form.validate_on_submit():
		activity = Activity(
			form.title.data, 
			form.description.data
		)
		
		db.session.add(activity)
		db.session.commit()

		flash('You\'ve created an activity successfully.')

		#return redirect(url_for('page.get_page'))
	else:
		flash_form_errors(form)

	return render_template('activity/create.htm', form=form)

@@ -15,48 +15,35 @@
 ort 
-Blueprint%0Afrom flask import abort, flash
+flash, get_flashed_messages
 , re
@@ -67,16 +67,19 @@
 mplate, 
+%5C%0A%09
 request,
@@ -86,16 +86,59 @@
  url_for
+, abort%0Afrom flask import Blueprint, Markup
 %0Afrom fl
@@ -254,17 +254,45 @@
 _errors%0A
+from forms import CreateForm
 %0A
-
 from mod
@@ -527,16 +527,37 @@
 age=1):%0A
+%09print %22hello world%22%0A
 %09activit
@@ -693,16 +693,8 @@
 te('
-/create_
 acti
@@ -698,16 +698,23 @@
 ctivity/
+create/
 ', metho

Adjusted the routes