[問題] django meta class
Django model meta class
https://docs.djangoproject.com/en/1.8/topics/forms/modelforms/#a-full-example
class BookForm(ModelForm):
class Meta:
model = Book
fields = ['name', 'authors']
class Book(models.Model):
name = models.CharField(max_length=100)
authors = models.ManyToManyField(Author)
django官網還有很多網路上的tutorial都在class Meta裡面使用model =xxx 和 fields
=[aaa,bbb]這兩個options
但是我在官網上model Meta options卻找不到這個用法
https://docs.djangoproject.com/en/1.8/ref/models/options/
請問有人知道官網上那裡可以找到這個reference嗎?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 76.169.54.91
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1429252645.A.784.html
→
04/17 14:57, , 1F
04/17 14:57, 1F
→
04/17 14:58, , 2F
04/17 14:58, 2F
Python 近期熱門文章
PTT數位生活區 即時熱門文章