Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2006-03-23 11:57:21
Size: 1449
Editor: 211
Comment:
Revision 4 as of 2006-03-23 13:01:15
Size: 2039
Editor: 211
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
= 당신의 첫번째 장고 application 만들기, part 1 = = 당신의 첫번째 Django application 만들기, part 1 =
Line 16: Line 16:

* 사람들이 polls에서 제안하고 poll의 결과를 보게 하는 publice site
 
* 당신이 비밀리에 polls를 추가하고, 바꾸고, 삭제하는 admin site
 * 사람들이 polls에서 제안하고 poll의 결과를 보게 하는 publice site
 * 당신이 비밀리에 polls를 추가하고, 바꾸고, 삭제하는 admin site
Line 23: Line 21:
== Initial setup == == 초기설정 ==
Line 27: Line 25:
django-admin.py startproject myproject 명령을 실행해라. {{{django-admin.py startproject myproject}}} 명령을 실행해라. 그것은 당신의 현재 디렉토리에 myproject 디렉토리를 만들 것이다.
Line 29: Line 27:
그것은 당신의 현재 디렉토리에 myproject 디렉토리를 만들 것이다. (만약 당신이 setup.py를 통해 장고를 install했다면, django-admin.py는 당신의 시스템 경로에 있을 것이다. 만약 당신의 경로가 아니라면, 당신은 site-packages/django/bin 에서 그것을 찾을 수 있다.
Line 31: Line 29:
(만약 당신이 setup.py를 통해 장고를 install했다면, django-admin.py는 당신의 시스템 경로에 있을 것이다. 만약 당신의 경로가 아니라면, 당신은 site- {{|
Where should this code live?
Line 33: Line 32:
packages/django/bin 에서 그것을 찾을 수 있다. If your background is in PHP, you're probably used to putting code under the Web server's document root (in a place such as /var/www). With Django, you don't do that. It's not a good idea to put any of this Python code within your Web server's document root, because it risks the possibility that people may be able to view your code over the Web. That's not good for security.

Put your code in some directory outside of the document root, such as /home/mycode.
|}}

{{{
myproject/
    __init__.py
    manage.py
    settings.py
    urls.py
}}}

Korean translation of http://www.djangoproject.com/documentation/tutorial1

TableOfContents

당신의 첫번째 Django application 만들기, part 1

이 문서는 Django 0.9.1을 다룬다. 구버전 : 0.90 docs

By Adrian Holovaty <holovaty@gmail.com>, Translated by [parkpro77]

예제로 배워보자.

이 듀토리얼을 통해서 우리는 당신에게 간단한 web poll application 만드는 것을 알려줄 것이다.

web poll application은 두 부분으로 구성된다.

  • 사람들이 polls에서 제안하고 poll의 결과를 보게 하는 publice site
  • 당신이 비밀리에 polls를 추가하고, 바꾸고, 삭제하는 admin site

우리는 당신이 이미 Django를 설치했다고 가정할 것이다.

초기설정

당신이 Django를 처음 사용하는 것이라면, 당신은 몇몇 initial setup에 주의해야 한다.

django-admin.py startproject myproject 명령을 실행해라. 그것은 당신의 현재 디렉토리에 myproject 디렉토리를 만들 것이다.

(만약 당신이 setup.py를 통해 장고를 install했다면, django-admin.py는 당신의 시스템 경로에 있을 것이다. 만약 당신의 경로가 아니라면, 당신은 site-packages/django/bin 에서 그것을 찾을 수 있다.

{{| Where should this code live?

If your background is in PHP, you're probably used to putting code under the Web server's document root (in a place such as /var/www). With Django, you don't do that. It's not a good idea to put any of this Python code within your Web server's document root, because it risks the possibility that people may be able to view your code over the Web. That's not good for security.

Put your code in some directory outside of the document root, such as /home/mycode. |}}

myproject/
    __init__.py
    manage.py
    settings.py
    urls.py

The development server

Database setup

Creating models

Activating models

Playing with the API

Django/Tutorial1 (last edited 2011-08-03 11:00:46 by localhost)

web biohackers.net