Thursday, October 12, 2017

DATA_UPLOAD_MAX_NUMBER_FIELDS exceeded when not conducting a mass event re ticket #26810

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.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f7de0c11-8b0a-6c30-6765-d42e5b0f5114%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment