title: Error: Using the URLconf defined in mysite.urls, Django tried these URL patterns
body: <p>I'm doing tutorial "Blog" from "Django by example" and i got error. <a href="http://127.0.0.1:8000/admin/" rel="nofollow noreferrer">http://127.0.0.1:8000/admin/</a> works fine. What i'm doing wrong?</p>
  
  <p>Error:
  Page not found (404)
  Request Method: GET
  Request URL:    <a href="http://127.0.0.1:8000/post/" rel="nofollow noreferrer">http://127.0.0.1:8000/post/</a>
  Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
  ^admin/
  The current URL, post/, didn't match any of these.</p>
  
  <p>mysite/blog/urls.py</p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  
  urlpatterns = {
      # post views
      url(r'^$', views.post_list, name='post_list'),
      url(r'^(?P&lt;year&gt;\d{4})/(?P&lt;month&gt;\d{2})/(?P&lt;day&gt;\d{2})/'\
          r'(?P&lt;post&gt;[-\w]+)/$',
          views.post_detail,
          name='post_detail'),
  }
  </code></pre>
  
  <p>mysite/blog/views.py</p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from .models import Post
  
  
  def post_list(request):
      posts = Post.published.all()
      return render(request,
                    'blog/post/list.html',
                    {'posts': posts})
  
  
  def post_detail(request, year, month, day, post):
      post = get_object_or_404(Post, slug=post,
                               status='published',
                               publish__year=year,
                               publish__mounth=month,
                               publish__day=day)
      return render(request,
                    'blog/post/detail.html',
                    {'post': post})
  </code></pre>
  
  <p>mysite/blog/admin.py</p>
  
  <pre><code>from django.contrib import admin
  from .models import Post
  
  
  class PostAdmin(admin.ModelAdmin):
      list_display = ('title', 'slug', 'author', 'publish', 'status')
      list_filter = ('status', 'created', 'publish', 'author')
      search_fields = ('title', 'body')
      prepopulated_fields = {'slug': ('title',)}
      raw_id_fields = ('author',)
      date_hierarchy = 'publish'
      ordering = ['status', 'publish']
  
  admin.site.register(Post, PostAdmin)
  </code></pre>
  
  <p>mysite/mysite/urls.py</p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^blog/', include('blog.urls',
                             namespace='blog',
                             app_name='blog')),
  ]
  </code></pre>
  
  <p>mysite/blog/models</p>
  
  <pre><code>from django.db import models
  from django.utils import timezone
  from django.contrib.auth.models import User
  from django.core.urlresolvers import reverse
  
  
  class Post(models.Model):
      STATUS_CHOICES = {
          ('draft', 'Draft'),
          ('published', 'Published'),
      }
      title = models.CharField(max_length=250)
      slug = models.SlugField(max_length=250,
                              unique_for_date='publish')
      author = models.ForeignKey(User,
                                 related_name='blog_posts')
      body = models.TextField()
      publish = models.DateTimeField(default=timezone.now)
      created = models.DateTimeField(auto_now_add=True)
      updated = models.DateTimeField(auto_now=True)
      status = models.CharField(max_length=10,
                                choices=STATUS_CHOICES,
                                default='draft')
  
      def get_absolute_url(self):
          return reverse('blog:post_detail',
              args=[self.publish.year,
              self.publish.strftime('%m'),
              self.publish.strftime('%d'),
              self.slug])
  
      class Meta:
          ordering =('-publish',)
  
          def __str__(self):
              return self.title
  </code></pre>