Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Latest commit

 

History

History
64 lines (59 loc) · 2.22 KB

environment.md

File metadata and controls

64 lines (59 loc) · 2.22 KB

#如何建立 arcane 開發環境

  1. 安裝 python3django
  • 如 Ubuntu/Debian: sudo apt-get install python3 && sudo pip install django
  1. git clone repo:
  • git clone git@github.com:sitcon-tw/arcane
  1. 設置db:
  • python3 manage.py migrate
  1. 設置管理帳號:
  • python3 createsuperuser
  1. 設置範例資料(就只是個範例資料 你可以自己改):
from app.models import *
from django.contrib.auth.models import User
u = User.objects.create_user("seadog007", "", "777777")
u.first_name = "seadog"
u.last_name = "007"
a = Card(name="這是一張點數卡", long_desc="<3", cid="seadog_and_denny")
b = Player(user=u,team=Team(name="第零小隊", tid="team0"))
u.save()
a.save()
b.save()
b.team.save()
  1. 開啟 local server
  • python3 manage.py runserver

其他東西