title: django-ckeditor image upload giving wrong url of the image
body: <p>When I try text editing and other text related stuffs and save it, the editor does its job nicely. But when I try to upload an image it just take a different url. I am on windows. Is it because of this, cause I saw a post on <a href="https://stackoverflow.com/questions/18894044/django-ckeditor-wont-render-images">this post</a>, but it didn't helped me either. It does get saved and they each have their own thumbnails too. But its just that the wrong urls.
  I checked the src of the image, and it was like this,</p>
  
  <p><code>&lt;img alt="" src="/media/3/10/17Hydrangeas.jpg" /&gt;</code></p>
  
  <p>But it should have been like this,</p>
  
  <p><code>&lt;img alt="" src="/media/2013/10/17/Hydrangeas.jpg" /&gt;</code></p>
  
  <p>And sometimes the src of the image is just like this,</p>
  
  <p><code>&lt;img alt="" src="/media/3/10/17" /&gt;</code></p>
  
  <p>This is the snippet of my settings.py:</p>
  
  <pre><code>CKEDITOR_UPLOAD_PATH = 'C:/Users/Nanyoo/web/demo/media'
  MEDIA_ROOT = 'C:/Users/Nanyoo/web/demo/media'
  </code></pre>
  
  <p>I've included its url in my urls.py:</p>
  
  <pre><code>(r'^ckeditor/', include('ckeditor.urls')),
  </code></pre>
  
  <p>models.py:</p>
  
  <pre><code>from django.db import models
  from datetime import datetime
  from django.contrib.auth.models import User
  from time import time
  
  
  def get_upload_file_name(instance, filename):
      return "uploaded_files/%s_%s" %(str(time()).replace('.','_'), filename)
  
  class Blog(models.Model):
      title = models.CharField(max_length=200)
      image = models.ImageField(upload_to=get_upload_file_name, blank=True)
      pub_date = models.DateTimeField(default=datetime.now)
      creator = models.ForeignKey(User, related_name="creator_set")
      body = models.TextField()
  </code></pre>
  
  <p>In the forms.py:</p>
  
  <pre><code>from django import forms
  from django_summernote.widgets import SummernoteWidget
  from ckeditor.widgets import CKEditorWidget
  
  class BlogForm(forms.Form):
      title = forms.CharField(max_length=200,widget=SummernoteWidget())
      body = forms.CharField(widget=CKEditorWidget())
  </code></pre>
  
  <p>In the index.html:</p>
  
  <pre><code>        {% for blog in blogs %}
          &lt;div id="page"&gt;
                  &lt;h1&gt;{{ blog.title | safe}}&lt;/h1&gt;
                  &lt;p&gt;{{ blog.body | safe}}&lt;/p&gt;
          &lt;/div&gt;
          {% endfor %}
  </code></pre>
  
  <p>my form in the html:</p>
  
  <pre><code>{% block content %} 
      &lt;form method="post" action="."&gt;
      {% csrf_token %}
      &lt;fieldset id="create_blog"&gt;
          {{form.media}}
          {{ form.as_p}}
          &lt;input type="submit" value="Post Blog" /&gt;
      &lt;/fieldset&gt;
      &lt;/form&gt;
  {% endblock %}
  </code></pre>