[5]Django Tutorial
Python 2014. 6. 27. 21:45 |이름부터 멋지다. Django 튜토리얼
1. 장고를 설치하기 위해서 Python 라이브러리 관리를 하는 pip 라는 녀석을 다운로드.
2. 그리고 그놈을 실행 "python get-pip" 그러나.. Proxy 서버 설정 문제로 설치가 제대로 안됐다.
3. 결국 장고를 설치한 방법은 mac 에서 사용하는 easy_install ! 아래와 같은 명령어로 쉽게 설치 했다.
터미널 >> sudo easy_install Django
아래 명령어를 치면, 현재 경로에 Django 프로젝트가 하나 생성된다.
django-admin.py startproject MiloDjangoProject
아래와 같은 폴더 구조로 생성
MiloDjangoProject/ manage.py mysite/ __init__.py settings.py urls.py wsgi.py
- manage.py: A command-line utility that lets you interact with this Django project in various ways. You can read all the details about manage.py in django-admin.py and manage.py.
- The inner mysite/ directory is the actual Python package for your project. Its name is the Python package name you’ll need to use to import anything inside it (e.g. mysite.urls).
- mysite/__init__.py: An empty file that tells Python that this directory should be considered a Python package. (Read more about packages in the official Python docs if you’re a Python beginner.)
- mysite/settings.py: Settings/configuration for this Django project. Django settings will tell you all about how settings work.
- mysite/urls.py: The URL declarations for this Django project; a “table of contents” of your Django-powered site. You can read more about URLs in URL dispatcher.
- mysite/wsgi.py: An entry-point for WSGI-compatible web servers to serve your project. See How to deploy with WSGI for more details