[flask] subdomain support
- From:
- Eunjin Lee
- Date:
- 2010-08-21 @ 11:38
Hello everyone,
I'm using Flask to move a site (written in php) that has several
sections working with sub-domain
Because each section has own contents but based on the *same* layout
from head to toe, so
I'd like to make A home('/') view function to serve all sections But
Flask sub-domain(cross-session) seems to
be support only one sub-domain in a module.
should I make 4 modules for each sections?
==========
a.mydomain.com
b.mydomain.com
c.mydomain.com
d.mydomain.com
*Config*
SERVER_NAME = mydomain.com
*Module*
home = Module(__name__, subdomain='a')
@home.route("/", methods=['POST','GET'])
def index():
return render_template('/home.html')
===========
Thanks,
EJ Lee