django-angular: Bug in as_ul?
I was prodding around on the example form page and got a 500 Internal Server Error when it was rendering {{ form.as_div }}
. I think I got the same error a day or two ago on my implementation too. Admittedly I was using a REST api test tool at the time, but still…
KeyError at /model_scope/ u’i’ Request Method: POST Request URL: http://django-angular.awesto.com/model_scope/ Django Version: 1.7.10 Exception Type: KeyError Exception Value: u’i’ Exception Location: /web/staging/projects/django-angular/djng/forms/angular_base.py in as_ul, line 85 Python Executable: /usr/sbin/uwsgi Python Version: 2.7.5 Python Path: [‘.’, ‘’, ‘/web/staging/projects/django-angular’, ‘/web/staging/projects/django-websocket-redis’, ‘/web/staging/virtualenvs/djangular/lib64/python27.zip’, ‘/web/staging/virtualenvs/djangular/lib64/python2.7’, ‘/web/staging/virtualenvs/djangular/lib64/python2.7/plat-linux2’, ‘/web/staging/virtualenvs/djangular/lib64/python2.7/lib-tk’, ‘/web/staging/virtualenvs/djangular/lib64/python2.7/lib-old’, ‘/web/staging/virtualenvs/djangular/lib64/python2.7/lib-dynload’, ‘/usr/lib64/python2.7’, ‘/usr/lib/python2.7’, ‘/web/staging/virtualenvs/djangular/lib/python2.7/site-packages’] Server time: Thu, 1 Dec 2016 10:44:22 +0100
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- initial commit to fix as_ul bug #270 - hidden field exception — committed to racitup/django-angular by racitup 7 years ago
- Merge pull request #300 from racitup/as_ul_hiddenfieldbug fix as_ul bug #270 - hidden field exception — committed to jrief/django-angular by jrief 7 years ago
- Merge pull request #6 from jrief/master initial commit to fix as_ul bug #270 - hidden field exception — committed to khchine5/django-angular by khchine5 7 years ago
As you say it is caused by the django forms _html_output code above extending strings into a list of SafeTuples for any hidden fields. I’ve fixed it in angular_base.py and will submit a PR shortly.