Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form CommitmentForm needs updating.
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/ |
Django Version: | 1.8.4 |
Exception Type: | ImproperlyConfigured |
Exception Value: | Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form CommitmentForm needs updating. |
Exception Location: | c:\Python27\lib\site-packages\django\forms\models.py in __new__, line 274 |
Python Executable: | c:\Python27\python.exe |
Python Version: | 2.7.10 |
Python Path: | ['c:\\data1\\SocialGame\\sg', 'C:\\windows\\SYSTEM32\\python27.zip', 'c:\\Python27\\DLLs', 'c:\\Python27\\lib', 'c:\\Python27\\lib\\plat-win', 'c:\\Python27\\lib\\lib-tk', 'c:\\Python27', 'c:\\Python27\\lib\\site-packages', 'c:\\data1\\SocialGame\\sg', 'c:\\data1\\SocialGame\\sg\\SocialGame\\../..', 'c:\\data1\\SocialGame\\sg'] |
Server time: | Mon, 24 Aug 2015 15:03:37 +0800 |
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/28ad1260-55f4-4eb2-af6c-5daee988e0ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from django import forms
from .models import myModel
class ModelForm(forms.ModelForm):
class Meta:
model = myModel
fields = '__all__'