Tony Mack | 71592a5 | 2013-03-28 20:17:47 -0400 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | import os |
| 3 | import sys |
| 4 | |
| 5 | from plstackapi.planetstack.config import Config |
| 6 | |
| 7 | if __name__ == '__main__': |
| 8 | |
| 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "plstackapi.planetstack.settings") |
| 10 | from django.core.management import ManagementUtility |
| 11 | config = Config() |
Tony Mack | e02d720 | 2013-03-29 11:23:56 -0400 | [diff] [blame] | 12 | url = "%s:%s" % (config.api_host, config.api_port) |
Tony Mack | 71592a5 | 2013-03-28 20:17:47 -0400 | [diff] [blame] | 13 | args = [__file__, 'runserver', url] |
| 14 | server = ManagementUtility(args) |
| 15 | server.execute() |