[問題] django meta class

看板Python作者 (suhang)時間10年前 (2015/04/17 14:37), 編輯推噓0(002)
留言2則, 1人參與, 最新討論串1/1
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
看錯頁了, 那個網頁是講 model meta, 你要看 form meta
04/17 14:57, 1F

04/17 14:58, , 2F
04/17 14:58, 2F
文章代碼(AID): #1LCAebU4 (Python)
文章代碼(AID): #1LCAebU4 (Python)