Mercurial > hatta-flask
annotate dev.py @ 2411:919edcf02dc0 default tip
Basic flask compatibility
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sun, 19 May 2013 13:16:35 +0200 |
| parents | 8b7d6c638736 |
| children |
| rev | line source |
|---|---|
|
2326
8b7d6c638736
Make the hashbang in dev.py more virtualenv-friendly
Radomir Dopieralski <sheep-devel@sheep.art.pl>
parents:
2266
diff
changeset
|
1 #! /usr/bin/env python |
|
198
bc02507c95f0
use wsgiref instead of werkzeug for seving, separate dev.py script with
sheep@ghostwheel
parents:
diff
changeset
|
2 # -*- coding: utf-8 -*- |
|
bc02507c95f0
use wsgiref instead of werkzeug for seving, separate dev.py script with
sheep@ghostwheel
parents:
diff
changeset
|
3 |
| 519 | 4 """ |
| 5 An auto-reloading standalone wiki server, useful for development. | |
| 6 """ | |
| 7 | |
|
198
bc02507c95f0
use wsgiref instead of werkzeug for seving, separate dev.py script with
sheep@ghostwheel
parents:
diff
changeset
|
8 import hatta |
|
bc02507c95f0
use wsgiref instead of werkzeug for seving, separate dev.py script with
sheep@ghostwheel
parents:
diff
changeset
|
9 import werkzeug |
|
bc02507c95f0
use wsgiref instead of werkzeug for seving, separate dev.py script with
sheep@ghostwheel
parents:
diff
changeset
|
10 |
|
520
1bd6f007f42d
make modules easier to import by checking __name__
sheep@ghostwheel
parents:
519
diff
changeset
|
11 if __name__=="__main__": |
|
1bd6f007f42d
make modules easier to import by checking __name__
sheep@ghostwheel
parents:
519
diff
changeset
|
12 config = hatta.WikiConfig() |
|
1bd6f007f42d
make modules easier to import by checking __name__
sheep@ghostwheel
parents:
519
diff
changeset
|
13 config.parse_args() |
|
2266
970c6d860854
_file_path doen't need to be overriden in SubdriectoryStorage
Radomir Dopieralski <hatta-dev@sheep.art.pl>
parents:
653
diff
changeset
|
14 # config.parse_files() |
|
520
1bd6f007f42d
make modules easier to import by checking __name__
sheep@ghostwheel
parents:
519
diff
changeset
|
15 application = hatta.Wiki(config).application |
| 653 | 16 host = config.get('interface', 'localhost') |
| 17 port = int(config.get('port', 8080)) | |
|
520
1bd6f007f42d
make modules easier to import by checking __name__
sheep@ghostwheel
parents:
519
diff
changeset
|
18 werkzeug.run_simple(host, port, application, use_reloader=True) |
