forked from CenterForOpenScience/osf.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
executable file
·25 lines (19 loc) · 735 Bytes
/
manage.py
File metadata and controls
executable file
·25 lines (19 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings')
from django.core.management import execute_from_command_line
from website.app import init_app
init_app(set_backends=True, routes=False, attach_request_handlers=False)
if 'livereload' in sys.argv:
from django.core.wsgi import get_wsgi_application
from livereload import Server
import django.conf as conf
conf.settings.STATIC_URL = '/static/'
application = get_wsgi_application()
server = Server(application)
server.watch('api/')
server.serve(port=8000)
else:
execute_from_command_line(sys.argv)