I tried to use default_if_none
in username
<input type="text" class="form-control" id="username" value="{{ form.username.value|default_if_none: '' }}" name='username'>
It throw error
django.template.exceptions.TemplateSyntaxError: default_if_none requires 2 arguments, 1 provide
I did not encounter such an error before.
The documentation did not provide a hint to solve the problem.
You have an extra space which causes the error.
value="{{ form.username.value|default_if_none: '' }}"
should be
value="{{ form.username.value|default_if_none:'' }}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With