title: File upload with CKEditor and Django
body: <p>I am having trouble with implementing image upload in DJango and CKEditor.</p>
  
  <p>Here is my code:
  models.py</p>
  
  <pre><code>from django.db import models
  from ckeditor.fields import RichTextField
  from ckeditor_uploader.fields import RichTextUploadingField
  
  # Create your models here.
  class post(models.Model):
      title = models.CharField(max_length=100)
      # body = RichTextField()
      body = RichTextUploadingField('body')
      date = models.DateTimeField()
      image = models.ImageField(upload_to = 'posts/%Y/%m/%d', null=True, blank=True)
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>urls.py:</p>
  
  <pre><code>from django.conf.urls import url, include
  from posts.models import post
  from posts import views
  from django.conf.urls.static import static
  from django.conf import settings
  
  app_name = 'posts'
  urlpatterns = [
      url(r'^$', views.IndexView.as_view(), name='index'),
      url(r'^(?P&lt;pk&gt;[0-9]+)/$', views.DetailView.as_view(), name='detail'),
      url(r'^ckeditor_uploader/', include('ckeditor_uploader.urls')),
  ] 
  
  if settings.DEBUG:
      urlpatterns += static(settings.MEDIA_URL, document_root= settings.MEDIA_ROOT)
  </code></pre>
  
  <p>Whenever I access Post in Admin, I get this error:</p>
  
  <pre><code>NoReverseMatch at /admin/posts/post/13/change/
  Reverse for 'ckeditor_upload' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  </code></pre>
  
  <p>It seems like an URL error but I am not sure what went wrong.</p>