Skip to content

Commit 02e6050

Browse files
committed
modified code to fix the bug in type index
1 parent ce2075b commit 02e6050

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/article/views.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ def index():
1111
@article.route('/type/create',methods=['GET','POST'])
1212
def create_type():
1313
form = TypeForm()
14-
print form.errors
14+
1515
if form.validate_on_submit():
16-
print 'ccc'
17-
type = ArticleType(title=form.data.title,description = form.data.description,modified_time=datetime.now())
16+
print form.title.data
17+
type = ArticleType(title=form.title.data,description = form.description.data,modified_time=datetime.now())
1818
print 'bbb'
1919
db.session.add(type)
2020
db.session.commit()
2121
print 'bbb'
2222
return render_template('create_type.html',form = form)
23+
@article.route('/type')
24+
def index_type():

0 commit comments

Comments
 (0)