title: Django-CKEditor with normal Django Forms and bootstrap
body: <p>I'm new to Django and CKEditor and had been struggling with integration of Django-CKEditor in forms from past 1 week. It works perfectly fine in Django Admin forms but does not work in normal forms.</p>
  
  <p>This is my forms.py</p>
  
  <pre><code>class ArticleForm(forms.ModelForm):
      content = forms.CharField(widget = CKEditorWidget())    
  
      class Meta:
          model = Article
          fields = ['title','content','meta_description','meta_tags']
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>class Article(models.Model):
      title = models.CharField(max_length=500)
      url = models.CharField(max_length=500)
      date = models.DateTimeField(auto_now_add=True, blank=True)
      author = models.CharField(max_length=100)
      content = models.TextField()
      meta_description = models.TextField()
      meta_tags = models.TextField()
      is_published = models.BooleanField(default=False)
  </code></pre>
  
  <p>views</p>
  
  <pre><code>def new_post(request):
      if request.method == 'POST':
          form = ArticleForm(request.POST)
          if form.is_valid():
              article = form.save(commit=False)
              article.url =  form.data['title']
              article.save()
              return HttpResponse('/thanks/')
      else:
          form = ArticleForm()
      return render(request, 'blog/new-post.html', {'form': form})
  </code></pre>
  
  <p>TO verify whether it works in admin, I had tested with Admin by adding it in admin form.</p>
  
  <p>admin.py </p>
  
  <pre><code>class ArticleAdminForm(forms.ModelForm):
      content = forms.CharField(widget=CKEditorWidget())
  
      class Meta:
          model = Article
  
  class ArticleAdmin(admin.ModelAdmin):
      form = ArticleAdminForm
  
  
  admin.site.register(Article, ArticleAdmin)
  </code></pre>
  
  <p>One more thing I'm using bootstrap3. and my template looks like</p>
  
  <pre><code>&lt;form class="form-horizontal" action="/blog/new-post/" method="post" &gt;{% csrf_token %}
              &lt;fieldset&gt;
                &lt;legend&gt;New Blog Post&lt;/legend&gt;
                  {{ form.non_field_errors }}
                  &lt;div class="fieldWrapper form-group"&gt;
                      {{ form.title.errors }}
                      &lt;label class="col-lg-2 control-label" for="id_title"&gt;Title&lt;/label&gt;
                      &lt;div class="controls col-lg-10 "&gt;
                        &lt;input type="text" class="col-lg-10 form-control" name="title" id="id_title}}" placeholder="Title"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="fieldWrapper form-group"&gt;
                      {{ form.content.errors }}
                      &lt;label class="col-lg-2 control-label" for="id_content"&gt;Content&lt;/label&gt;
                      &lt;div class="controls col-lg-10 "&gt;
                        &lt;textarea class="col-lg-10 form-control" rows="17"name="content" id="id_content}}" placeholder="Content"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="fieldWrapper form-group"&gt;
                      {{ form.meta_description.errors }}
                      &lt;label class="col-lg-2 control-label" for="id_meta_description"&gt;Description&lt;/label&gt;
                      &lt;div class="controls col-lg-10 "&gt;
                        &lt;textarea class="col-lg-10 form-control" rows="5"name="meta_description" id="id_meta_description}}" placeholder="Short description about this article."&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="fieldWrapper form-group"&gt;
                      {{ form.meta_tags.errors }}
                      &lt;label class="col-lg-2 control-label" for="id_meta_tags"&gt;Tags&lt;/label&gt;
                      &lt;div class="controls col-lg-10 "&gt;
                        &lt;input type="text" class="col-lg-10 form-control" name="meta_tags" id="id_meta_tags}}" placeholder="Comma separated tags eg. trekking, hiking "&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                &lt;input type="submit" value="Publish"  class="btn btn-default btn-large pull-right"&gt;
              &lt;/fieldset&gt;
            &lt;/form&gt;
  </code></pre>
  
  <p>Any help would be great. Thanks in advance</p>