Mercurial > p > roundup > code
comparison roundup/demo.py @ 7446:fb39200904a5
Add newlines to make scanning of demo instructions easier.
Add blank line before the output and add blank lines before/after the
displayed url.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 01 Jun 2023 00:39:25 -0400 |
| parents | 7b9bddda9d2d |
| children | 78490b5b1bfe |
comparison
equal
deleted
inserted
replaced
| 7445:abc2ec25b3d1 | 7446:fb39200904a5 |
|---|---|
| 141 For running under docker, we need to split ports into | 141 For running under docker, we need to split ports into |
| 142 the port roundup-server binds to (usually 8080) and the | 142 the port roundup-server binds to (usually 8080) and the |
| 143 external mapping requested by docker to be used in external url's. | 143 external mapping requested by docker to be used in external url's. |
| 144 """ | 144 """ |
| 145 | 145 |
| 146 print("Demo Tracker Home:", home) | 146 print("\nDemo Tracker Home:", home) |
| 147 | 147 |
| 148 cfg = configuration.CoreConfig(home) | 148 cfg = configuration.CoreConfig(home) |
| 149 url = cfg["TRACKER_WEB"] | 149 url = cfg["TRACKER_WEB"] |
| 150 try: | 150 try: |
| 151 hostname, port = urlparse.urlparse(url)[1].split(':') | 151 hostname, port = urlparse.urlparse(url)[1].split(':') |
| 159 "Exiting.\n" % {'home': home, 'url': url}) | 159 "Exiting.\n" % {'home': home, 'url': url}) |
| 160 exit(1) | 160 exit(1) |
| 161 | 161 |
| 162 bind_addr = bind_addr or hostname | 162 bind_addr = bind_addr or hostname |
| 163 port = int(bind_port or port) | 163 port = int(bind_port or port) |
| 164 success_message = '''Server running - connect to: | 164 success_message = '''Server running - connect to:\n |
| 165 %(url)s | 165 %(url)s\n |
| 166 1. Log in as "demo"/"demo" or "admin"/"admin". | 166 1. Log in as "demo"/"demo" or "admin"/"admin". |
| 167 2. Hit Control-C to stop the server. | 167 2. Hit Control-C to stop the server. |
| 168 3. Re-start the server by running "%(script)s" again. | 168 3. Re-start the server by running "%(script)s" again. |
| 169 4. Reset the tracker by running "%(script)s nuke". | 169 4. Reset the tracker by running "%(script)s nuke". |
| 170 | 170 |
