I am trying to render the built-in SelectDateWidget in Django, however in the webpage it shows as
<django.forms.widgets.SelectDateWidget object at 0xb4f6bc6c> Submit
I am new to Django, I read the documentation and looked up on the internet, but couldn't came up with a solution.
Here is my,
views.py
from django.shortcuts import render
from django.forms.widgets import SelectDateWidget
def yillik(request):
form = SelectDateWidget()
return render(request, 'izinyillik.html', {'form': form})
izinyillik.html
<form method="post">
{% csrf_token %}
{{ form }}
<button type="submit">Submit</button>
</form>