How to avoid the "Number of GET / POST errors" error?

I created a custom admin page on my Django website where only administrators are allowed and will be able to modify objects and their attributes. The number of objects is many (9220 exactly), and on the admin page there are equal numbers of input fields as objects in this model.

This is the code:

<form action="{% url 'Home:AdminPrices' %}" id="mainForm" method="post">
{% csrf_token %}
{% for item in prices %}
    <ul class="row" style="width: 100%;padding: 0;background-color: white;height: 100px;display: flex;justify-content: left;white-space: nowrap;margin-bottom: 0;margin-top: 0;">
        <div style="width: 33.333333333333336%;background-color: white;display:  block;color: black;font-size: 0.8em;white-space: nowrap;text-align: center;font-family: 'Lato';padding-top: 25px;">{{ item.hashname }}</div>
        <div style="width: 33.333333333333336%;background-color: white;display:  block;color: black;font-size: 1.2em;text-align: center;font-family: 'Lato';padding-top: 25px;">{{ item.sug }}</div>
        <div style="width: 33.333333333333336%;background-color: white;display:  block;color: black;font-size: 1.2em;text-align: center;font-family: 'Lato';"><input type="number" value="{{ item.actual }}" name="prices_{{ item.actual }}" style="width: 100%;height: 100%;padding-bottom: 25px;background-color: white;border: 0;color: black;font-size: 1.2em;text-align: center;font-family: 'Lato';"></input></div>
    </ul>
{% endfor %}
    <input type="submit" id="mainSubmit" style="display: none;" name="submitPrices"></input>
</form>
<div onclick="document.getElementById('mainForm').submit();" style="background-color: black;border-radius: 5px;position: fixed;display: block;height: 50px;width: 200px;bottom: 0;left:0;right:0;margin: 0 auto;color: white;font-size: 1.5em;text-align: center;padding-top: 12.5px;cursor: pointer;">Submit</div>

After clicking the "Submit" button, the website displays an error message:

2017-06-25 10: 05: 53,158: GET/POST settings.DATA_UPLOAD_MAX_NUMBER_FIELDS. 2017-06-25 10: 05: 53,860: WSGI 2017-06-25 10: 05: 53,934: TooManyFieldsSent: GET/POST settings.DATA_UPLOAD_MAX_NUMBER_FIELDS. 2017-06-25 10: 05: 53,934:
"/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", 170, 2017-06-25 10: 05: 53,935: response = self.get_response () 2017-06-25 10: 05: 53,935: 2017-06-25 10: 05: 53,935: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/core/handlers/base.py", 124, get_response 2017-06-25 10: 05: 53,935: response = self._middleware_chain () 2017-06-25 10: 05: 53,936: 2017-06-25 10: 05: 53,936: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", 41, 2017-06-25 10: 05: 53,936: = response_for_exception (, ) 2017-06-25 10: 05: 53,936: 2017-06-25 10: 05: 53,936: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", 76, response_for_exception 2017-06-25 10: 05: 53,937:
response = debug.technical_500_response (, * sys.exc_info(), status_code = 400) 2017-06-25 10: 05: 53,937: 2017-06-25 10: 05: 53,937:
"/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/views/debug.py", line 84, in technical_500_response 2017-06-25 10: 05: 53,937: html = reporter.get_traceback_html() 2017-06-25 10: 05: 53,937: 2017-06-25 10: 05: 53,937: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/views/debug.py", 316, get_traceback_html 2017-06-25 10: 05: 53,938: c = (self.get_traceback_data(), use_l10n = False) 2017-06-25 10: 05: 53,938: 2017-06-25 10: 05: 53,938: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/views/debug.py", 293, get_traceback_data 2017-06-25 10: 05: 53,938:
'filter_POST': self.filter.get_post_parameters (self.request), 2017-06-25 10: 05: 53,938: 2017-06-25 10: 05: 53,938: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/views/debug.py", 167, get_post_parameters 2017-06-25 10: 05: 53,938: return request.POST 2017-06-25 10: 05: 53,938: 2017-06-25 10: 05: 53,939: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", 128, _get_post 2017-06-25 10: 05: 53,939:
self._load_post_and_files() 2017-06-25 10: 05: 53,939: 2017-06-25 10: 05: 53,939: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/http/request.py", 311, _load_post_and_files 2017-06-25 10: 05: 53,939:
self._post, self._files = QueryDict (self.body, encoding = self._encoding), MultiValueDict() 2017-06-25 10: 05: 53,939: 2017-06-25 10: 05: 53,940: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/http/request.py", 397, init 2017-06-25 10: 05: 53,940: , limited_parse_qsl (query_string, ** parse_qsl_kwargs): 2017-06-25 10: 05: 53,940: 2017-06-25 10: 05: 53,940: "/home/MTonskins/Tonskins/Selement/senv/local/lib/python2.7/site-packages/django/utils/http.py", 350, limited_parse_qsl 2017-06-25 10: 05: 53,940: ' GET/POST

, . ? ? , ? DATA_UPLOAD_MAX_NUMBER_FIELDS ? .

+6
1
+5

All Articles