Esempio n. 1
0
from app_blog import app

app.debug = True
app.run()
Esempio n. 2
0
from app_blog import app
from app_blog import db
from flask import render_template
from app_blog.author.model import UserRegister
from app_blog.author.form import FormRegister 

@app.route('/register', methods=['GET', 'POST'] )
def register() :
	
	form = FormRegister()
	
	if form.validate_on_submit() :
		user = UserRegister(
			username = form.username.data,
			email = form.email.data,
			password = form.password.data,
		)

		db.session.add( user )
		db.session.commit()
		return "Success"

	return render_template( 'author/register.html', form=form )


if __name__ == '__main__':
	app.run( port=8000, debug=True )
Esempio n. 3
0
from app_blog import app

app.debug = True
app.run( port=8000 )
Esempio n. 4
0
from app_blog import app

app.debug = True
app.run(host="0.0.0.0", port=8090)