[python] 장고(Django)
장고(Django)
초기
https://tutorial.djangogirls.org/ko/
현재 서버에는 python(2.x)와 python3(3.x)가 설치 되어 있으므로 python3이라는 명령어를 사용한다.
python3 manage.py runserver 0.0.0.0:8000
mysql 구축
https://www.digitalocean.com/community/tutorials/how-to-create-a-django-app-and-connect-it-to-a-database
기존 mysql server가 설치되어 있다면
pip3 install mysqlclient
apply the migrations for app(s): admin, auth, blog, contenttypes, sessions. Run 'python manage.py migrate' to apply them.
python3 manage.py makemigrations
python3 manage.py migrate"
관리자생성
(myvenv) ~/djangogirls$ python3 manage.py createsuperuser
Username: admin
Email address: [email protected]
Password:
Password (again):
Superuser created successfully."
admin / Admi