Opened 21 months ago
Last modified 21 months ago
#34329 closed Bug
django-formset new app - i am facing the issue Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data — at Version 1
Reported by: | Sasikumar K | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I am new to django . while i am trying to use django-formset third party app in my form modelchoice control change event show the error - Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data - i have spent 6 hours i could not fix the error.
Change History (2)
by , 21 months ago
Attachment: | error1.png added |
---|
comment:1 by , 21 months ago
Description: | modified (diff) |
---|---|
Needs documentation: | set |
Note:
See TracTickets
for help on using tickets.
form.py
class OfficedetForm(forms.ModelForm):
"office_name",
"office_mail",
"office_place",
"office_gender_type",
"office_mgnt_type",
"office_class_level",
"office_type",
'office_tanno',
'office_udisecode',
"office_logo",
]
views.py
class OfficeDetailCreateView(AdminUserTypeAuthMixin,FileUploadMixin, FormViewMixin, LoginRequiredMixin, CreateView):
page.html
{% extends "layouts/masterpage-formset.html" %}
{% block pagecontent %}
{% load render_form from formsetify %}
<django-formset endpoint="{{ request.path }}" csrf-token="{{ csrf_token }}">
</div>
</django-formset>
{% endblock pagecontent %}