1👍
✅
You correctly instantiate the form twice, once in the GET block and once in the POST. However, you only pass the my_arg
argument in the GET block. Since your __init__
method requires that argument, you get an error. You should make sure to pass the argument both times.
0👍
The error means that there is no key word argument called my_arg
in kwargs
.
You might want to check if my_arg
is present or not using if 'my_arg' in kwargs:
Finally the u
means your data is in unicode
. Wont cause any problem i guess.
👤Asur
- [Answer]-JQuery Tooltip effects not working
- [Answer]-Pass arbitrary number of form elements to Django view
- [Answer]-Class has no foreign key to class
- [Answer]-404 error Django
Source:stackexchange.com