Size: 372
Comment:
|
Size: 2376
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Database API reference This covers Django version 0.91. Old version: 0.90 docs |
## page was renamed from Django/Tutorial1/데이타베이스 API 문헌 Korean translation of http://www.djangoproject.com/documentation/db_api/ |
Line 4: | Line 4: |
Once you've created your data models, you'll need to retrieve data from the database. This document explains the database abstraction API derived from the models, and how to create, retrieve and update objects. | 데이타베이스 API 레퍼런스 |
Line 6: | Line 6: |
Throughout this reference, we'll refer to the following Poll application: | 이 문서는 Django 0.9.1을 다룬다. 구버전 : 0.90 docs translated by [parkpro77] [[TablesOfContents]] 당신이 데이타 모델을 만들었다면, 데이타베이스로부터 데이타를 회수하는 것이 필요할 것이다. 이 문서는 모델로부터 파생되어진 데이타베이스를 설명하고, 객체들이 어떻게 만들어지고 복구되어지고 업데이트되어지는지 설명한다. 이 문헌을 통해서 다음의 투표 프로그램을 알게 될 것이다: {{{#!python class Poll(meta.Model): slug = meta.SlugField(unique_for_month='pub_date') question = meta.CharField(maxlength=255) pub_date = meta.DateTimeField() expire_date = meta.DateTimeField() def __repr__(self): return self.question class Choice(meta.Model): poll = meta.ForeignKey(Poll, edit_inline=meta.TABULAR, num_in_admin=10, min_num_in_admin=5) choice = meta.CharField(maxlength=255, core=True) votes = meta.IntegerField(editable=False, default=0) def __repr__(self): return self.choice }}} == Basic lookup functions == === get_object(**kwargs) === === get_list(**kwargs) === === get_iterator(**kwargs) === === get_count(**kwargs) === === get_values(**kwargs) === === get_values_iterator(**kwargs) === === get_in_bulk(id_list, **kwargs) === == Field lookups == === OR lookups === == Ordering == == Relationships (joins) == === One-to-one relations === === Many-to-one relations === === Many-to-many relations === === Relationships across applications === === Selecting related objects === == Limiting selected rows == == Other lookup options == === params === === select === === where / tables === == Changing objects == == Creating new objects == == Deleting objects == == Comparing objects == == Extra instance methods == === get_FOO_display() === === get_next_by_FOO(**kwargs) and get_previous_by_FOO(**kwargs) === === get_FOO_filename() === === get_FOO_url() === === get_FOO_size() === === save_FOO_file(filename, raw_contents) === === get_FOO_height() and get_FOO_width() === == Extra module functions == === get_FOO_list(kind, **kwargs) === |
Korean translation of http://www.djangoproject.com/documentation/db_api/
데이타베이스 API 레퍼런스
이 문서는 Django 0.9.1을 다룬다. 구버전 : 0.90 docs translated by [parkpro77]
당신이 데이타 모델을 만들었다면, 데이타베이스로부터 데이타를 회수하는 것이 필요할 것이다. 이 문서는 모델로부터 파생되어진 데이타베이스를 설명하고, 객체들이 어떻게 만들어지고 복구되어지고 업데이트되어지는지 설명한다.
이 문헌을 통해서 다음의 투표 프로그램을 알게 될 것이다:
1 class Poll(meta.Model):
2 slug = meta.SlugField(unique_for_month='pub_date')
3 question = meta.CharField(maxlength=255)
4 pub_date = meta.DateTimeField()
5 expire_date = meta.DateTimeField()
6
7 def __repr__(self):
8 return self.question
9
10 class Choice(meta.Model):
11 poll = meta.ForeignKey(Poll, edit_inline=meta.TABULAR,
12 num_in_admin=10, min_num_in_admin=5)
13 choice = meta.CharField(maxlength=255, core=True)
14 votes = meta.IntegerField(editable=False, default=0)
15
16 def __repr__(self):
17 return self.choice
Basic lookup functions
get_object(**kwargs)
get_list(**kwargs)
get_iterator(**kwargs)
get_count(**kwargs)
get_values(**kwargs)
get_values_iterator(**kwargs)
get_in_bulk(id_list, **kwargs)
Field lookups
OR lookups
Ordering
Relationships (joins)
One-to-one relations
Many-to-one relations
Many-to-many relations
Relationships across applications
Selecting related objects
Limiting selected rows
Other lookup options
params
select
where / tables
Changing objects
Creating new objects
Deleting objects
Comparing objects
Extra instance methods
get_FOO_display()
get_next_by_FOO(**kwargs) and get_previous_by_FOO(**kwargs)
get_FOO_filename()
get_FOO_url()
get_FOO_size()
save_FOO_file(filename, raw_contents)
get_FOO_height() and get_FOO_width()
Extra module functions