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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Mike Dewhirst-3
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

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

Matthew Pava
You may just want to set it to None, but check out the description in documentation.
https://docs.djangoproject.com/en/1.11/ref/settings/#data-upload-max-number-fields


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Mike Dewhirst
Sent: Thursday, October 12, 2017 3:08 AM
To: [hidden email]
Subject: 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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/6ef2d67d4b094e8c959e92458270b302%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Mike Dewhirst-3
On 13/10/2017 1:49 AM, Matthew Pava wrote:
> You may just want to set it to None, but check out the description in documentation.
> https://docs.djangoproject.com/en/1.11/ref/settings/#data-upload-max-number-fields

Makes sense. Thank you. Might have to rethink the design and get mean
with the number of fields. There are lots of FKs etc.


>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Mike Dewhirst
> Sent: Thursday, October 12, 2017 3:08 AM
> To: [hidden email]
> Subject: 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 [hidden email].
> To post to this group, send email to [hidden email].
> 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.
>


--
SharedSDS
Free open source GHS classification software

PO Box 308
Mount Eliza
Vic 3930
Australia

T: +61 (0)3 9034 3977
M: +61 (0)411 704 143
https://www.sharedsds.com/

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/650274af-24a4-7428-c559-3a5df88d3a36%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.