We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce2075b commit 02e6050Copy full SHA for 02e6050
app/article/views.py
@@ -11,12 +11,14 @@ def index():
11
@article.route('/type/create',methods=['GET','POST'])
12
def create_type():
13
form = TypeForm()
14
- print form.errors
+
15
if form.validate_on_submit():
16
- print 'ccc'
17
- type = ArticleType(title=form.data.title,description = form.data.description,modified_time=datetime.now())
+ print form.title.data
+ type = ArticleType(title=form.title.data,description = form.description.data,modified_time=datetime.now())
18
print 'bbb'
19
db.session.add(type)
20
db.session.commit()
21
22
return render_template('create_type.html',form = form)
23
+@article.route('/type')
24
+def index_type():
0 commit comments