import os
import sys
import argparse

def init():
	os.chdir(os.path.dirname(__file__))
	sys.path.append(os.path.abspath("."))

	os.system("python manage.py migrate")
	os.system("python manage.py createsuperuser")

def run():
	os.chdir(os.path.dirname(__file__))
	sys.path.append(os.path.abspath("."))

	C = argparse.ArgumentParser()
	C.add_argument("--port" , type = int , default = 7999)
	C = C.parse_args()

	os.system("python manage.py migrate")
	os.system("python manage.py runserver 0.0.0.0:%d" % (C.port))
