Fw: [問題] django meta class

看板Web_Design作者 (suhang)時間10年前 (2015/04/17 14:37), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
※ [本文轉錄自 Python 看板 #1LCAebU4 ] 作者: suhang (suhang) 看板: Python 標題: [問題] django meta class 時間: Fri Apr 17 14:37:19 2015 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 ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 轉錄者: suhang (76.169.54.91), 04/17/2015 14:37:38
文章代碼(AID): #1LCAepbP (Web_Design)
文章代碼(AID): #1LCAepbP (Web_Design)