title: How to set root url in django urls.py ? Django 1.8
body: <p>I have just started with django now and was configuring urls. I am able to map different urls like /posts, /posts/create etc. Somehow I am not able to configure root url, I am not sure what wrong I am doing. Here is my configuration : </p>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>url(r'^$',homeViews.posts),
  # url(r'^blog/', include('blog.urls')),
  url(r'^posts/',homeViews.posts),
  url(r'^createPost/',homeViews.createPost),
  </code></pre>
  
  <p>Here is the <strong>View</strong> Code</p>
  
  <pre><code>def posts(request):
    t = get_template('index.html')
    postList = Post.objects()
    html = t.render(Context({'posts':postList}))
    return HttpResponse(html)
  </code></pre>
  
  <p>Strange thing is, when I set DEBUG=True in settings, root url '^$' works but not with DEBUG=False (400 Bad Request). Not sure what is wrong.
  Please help me out .</p>
  
  <p>Edit : </p>
  
  <p>Here is the complete urls.py</p>
  
  <pre><code>from django.conf.urls import url
  from rrdquest import views as homeViews
  from manage.user import views as userViews
  
  
  urlpatterns = [
  # Examples:
  url(r'',homeViews.posts),
  # url(r'^blog/', include('blog.urls')),
  url(r'^posts/',homeViews.posts),
  url(r'^createPost/',homeViews.createPost),
  url(r'^createUser/',userViews.createUser),
  url(r'^post/(?P&lt;title&gt;[a-z,A-Z]+)/$',homeViews.post),
  ]
  </code></pre>
  
  <p>Cheers!</p>