title: django bootstrap datetimepicker
body: <p>i am trying to implement the datepicker using the django bootstrap datepicker widget, but the datepicker is not showing  on the webpage ("welcome.html)
  i have passed the form to the views and called the form in the webpage
  any help will be appreciated</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class DateForm(forms.Form):
  todo = forms.CharField(
      widget=forms.TextInput(attrs={"class":"form-control"}))
  date_1=forms.DateField(widget=DatePicker(
      options={"format": "mm/dd/yyyy",
      "autoclose": True }))
  
  def cleandate(self):
      c_date=self.cleaned_data['date_1']
      if c_date &lt; datetime.date.today():
          raise ValidationError(_('date entered has passed'))
      elif c_date &gt; datetime.date.today():
          return date_1
  def itamdate(self):
      date_check=calendar.setfirstweekday(calendar.SUNDAY)
      if c_date:
          if date_1==date_check:
              pass
          elif date_1!=date_check:
              raise ValidationError('The Market will not hold today')
          for days in list(range(0,32)):
              for months in list(range(0,13)):
                  for years in list(range(2005,2108)):
                      continue
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def imarket(request):
      #CREATES A FORM INSTANCE AND POPULATES USING DATE ENTERED BY THE USER
  
      if request.method=='POST':
          form = DateForm(request.POST or None)
      #checks validity of the form
          if form.is_valid():
              itamdate=form.cleaned_data['date_1']
              return HttpResponseRedirect(reverse('welcome.html'))
      return render(request, 'welcome.html', {'form':form})
  </code></pre>
  
  <p><strong>welcome.html</strong></p>
  
  <pre><code> {%  extends 'base.html' %}
  {% load bootstrap %}
   &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"&gt;
      &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="//cdn.bootcss.com/bootstrap-datetimepicker/4.17.44/js/bootstrap-datetimepicker.min.js"&gt;&lt;/script&gt;
  {% block content  %}
  &lt;title&gt;welcome&lt;/title&gt;
  
      &lt;form action = "{% url "imarket"}" method = "POST" role="form"&gt;
          {% csrf_token %}
          &lt;table&gt;
              {{form|bootstrap_horizontal}}
          &lt;/table&gt;
          &lt;div class = "form-group"&gt;
              &lt;input type ="submit" value= "CHECK" class="form control"/&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  
  {% endblock %}
  </code></pre>