월요일, 7월 22, 2024
HomeLanguagedjango install on ubuntu

django install on ubuntu

django install on ubuntu

ubuntu djanggo 설치

djanggo 설치

apt-get install python-django

apt-get install python-django

버전확인

django-admin –version

django-admin --version

pip Install

apt-get install python-pip

apt-get install python-pip

virtualenv install

pip install virtualenv

pip install virtualenv
Downloading/unpacking virtualenv
  Downloading virtualenv-15.0.1-py2.py3-none-any.whl (1.8MB): 1.8MB downloaded
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...

프로젝트 폴더생성

mkdir ~/project
cd ~/project

프로젝트 생성

django-admin startproject sampleproject

django-admin startproject sampleproject
cd sampleproject

DB 생성

python manage.py migrate

python manage.py migrate
Operations to perform:
  Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying sessions.0001_initial... OK

슈퍼유저 생성

python manage.py createsuperuser

python manage.py createsuperuser
Username (leave blank to use 'admin'): admin
Email address: admin@local.lc
Password: 
Password (again): 
Superuser created successfully.

서버기동

python manage.py runserver 0.0.0.0:8000

python manage.py runserver 0.0.0.0:8000
Performing system checks...

System check identified no issues (0 silenced).
March 18, 2016 - 07:28:02
Django version 1.7.6, using settings 'sampleproject.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

접속
http://localhost:8000/
django001

관리자 URL (username , passowrd 는 createsuper생성에서 생성한 username,password)
http://localhost:8000/admin
django002

django install on ubuntu

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular