I have an Admin based application which is somewhat ambitious for the
Admin. Perhaps. My central model (substance) has a lot of stuff to do
when it is saved. I received the error[1] when saving a substance. Not
all substances. In fact only one out of twenty or so I was testing.
I thought it must be data related because the substance wasn't different
than the others.
I could work around the problem by increasing the
DATA_UPLOAD_MAX_NUMBER_FIELDS to 1045
I have left it at 1500 for now but I'm somewhat concerned. Why is it so?
I don't think there are more than the default 1000 fields. I haven't
counted them though.
Thanks for any elucidation
Mike
[1]
Environment:
Request Method: POST
Request URL:
http://localhost:8000/admin/substance/substance/80/change/
Django Version: 1.10.8
Python Version: 3.5.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.staticfiles',
'billing',
'common',
'company',
'credit',
'refer',
'regulation',
'substance',
'workplace']
Installed Middleware:
['django.middleware.cache.UpdateCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.admindocs.middleware.XViewMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware']
Traceback:
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\handlers\exception.py"
in inner
42. response = get_response(request)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\handlers\base.py"
in _legacy_get_response
249. response = self._get_response(request)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\handlers\base.py"
in _get_response
178. response = middleware_method(request, callback,
callback_args, callback_kwargs)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\middleware\csrf.py" in
process_view
260. request_csrf_token =
request.POST.get('csrfmiddlewaretoken', '')
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\handlers\wsgi.py"
in _get_post
128. self._load_post_and_files()
File "C:\Users\mike\env\xxex3\lib\site-packages\django\http\request.py"
in _load_post_and_files
299. self._post, self._files =
self.parse_file_upload(self.META, data)
File "C:\Users\mike\env\xxex3\lib\site-packages\django\http\request.py"
in parse_file_upload
258. return parser.parse()
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\http\multipartparser.py"
in parse
183. 'The number of GET/POST parameters
exceeded '
Exception Type: TooManyFieldsSent at /admin/substance/substance/80/change/
Exception Value: The number of GET/POST parameters exceeded
settings.DATA_UPLOAD_MAX_NUMBER_FIELDS.