In django 1.6.5 I want to use AdminSplitDateTime
widget in a custom form. this is what I've done so far:
#forms.py
class MyForm(forms.Form):
...
pub = forms.DateTimeField(label="pub", widget=widgets.AdminSplitDateTime())
and in the template I have:
#mytemplate.html
...
<form method="post" action=".">
{% csrf_token %}
<table id="form_table">
{{ form.as_table }}
</table>
<input type="submit" value='{% trans "Send" %}' />
</form>
but when I open the page, date and time shortcuts beside the widgets (today and now) are not rendered. at first I thought maybe I'm not including right css
and js
, so I checked a regular admin page which renders the widget correctly and added all the css
and js
needed, but nothing heppend.
so what may be the problem?