title: Error during template rendering in Django 1.11
body: <p>Django Version: 1.11
  Python Version: 3.6.1
  I am trying to follow a Django tutorial on Openclassroom (<a href="https://openclassrooms.com/courses/developpez-votre-site-web-avec-le-framework-django/les-vues-generiques?q=&amp;hPP=8&amp;idx=prod_v2_COURSES_fr&amp;p=0&amp;fR%5Bcertificate%5D%5B0%5D=true&amp;fR%5BisWeb%5D%5B0%5D=true&amp;is_v=1" rel="nofollow noreferrer">Tuto</a>), I have a problem that I can not solve, I can not remove this error</p>
  
  <p>Here is the traceback:</p>
  
  <pre><code>File "C:\Python36\lib\site-packages\django\core\handlers\exception.py" in inner
    41.             response = get_response(request)
  
  File "C:\Python36\lib\site-packages\django\core\handlers\base.py" in _get_response
    187.                 response = self.process_exception_by_middleware(e, request)
  
  File "C:\Python36\lib\site-packages\django\core\handlers\base.py" in _get_response
    185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  
  File "C:\Users\admin\crepes\blog\views.py" in accueil
    15.     return render(request, 'blog/accueil.html', {'articles': articles})
  
  File "C:\Python36\lib\site-packages\django\shortcuts.py" in render
    30.     content = loader.render_to_string(template_name, context, request, using=using)
  
  File "C:\Python36\lib\site-packages\django\template\loader.py" in render_to_string
    68.     return template.render(context, request)
  
  File "C:\Python36\lib\site-packages\django\template\backends\django.py" in render
    66.             return self.template.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render
    207.                     return self._render(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in _render
    199.         return self.nodelist.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render
    990.                 bit = node.render_annotated(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render_annotated
    957.             return self.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py" in render
    177.             return compiled_parent._render(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in _render
    199.         return self.nodelist.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render
    990.                 bit = node.render_annotated(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render_annotated
    957.             return self.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py" in render
    72.                 result = block.nodelist.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render
    990.                 bit = node.render_annotated(context)
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render_annotated
    957.             return self.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\defaulttags.py" in render
    216.                     nodelist.append(node.render_annotated(context))
  
  File "C:\Python36\lib\site-packages\django\template\base.py" in render_annotated
    957.             return self.render(context)
  
  File "C:\Python36\lib\site-packages\django\template\defaulttags.py" in render
    458.             url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
  
  File "C:\Python36\lib\site-packages\django\urls\base.py" in reverse
    91.     return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  
  File "C:\Python36\lib\site-packages\django\urls\resolvers.py" in _reverse_with_prefix
    497.         raise NoReverseMatch(msg)
  
  Exception Type: NoReverseMatch at /blog/accueil
  Exception Value: Reverse for 'blog_lire' with arguments '('',)' not found. 1 pattern(s) tried: ['blog/(?P&lt;slug&gt;.+)$']
  </code></pre>
  
  <p>Some code :</p>
  
  <p>models.py:</p>
  
  <pre><code>from django.db import models
  
  class Article(models.Model):
    titre = models.CharField(max_length=100)
    slug = models.SlugField()
    auteur = models.CharField(max_length=42)
    contenu = models.TextField(null=True)
    date = models.DateTimeField(verbose_name="Date de parution",
                              auto_now_add=True, auto_now=False)
    is_visible = models.BooleanField(verbose_name="Article publié ?",
                                   default=False)
    categorie = models.ForeignKey('Categorie')
  
    def __str__(self):
      return self.titre
  
  class Categorie(models.Model):
    titre = models.CharField(max_length=100)
    def __str__(self):
      return self.titre
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from .models import Article
  
  def accueil(request): 
    articles = Article.objects.filter(is_visible=True).order_by('-date')[:4]
    return render(request, 'blog/accueil.html', {'articles': articles})
  
  def lire_article(request, slug):
     article = get_object_or_404(Article, slug=slug)
     return render(request, 'blog/lire_article.html', {'article': article})
  </code></pre>
  
  <p>blog/urls.py:</p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  
  urlpatterns = [
    url(r'^accueil$', views.accueil),
    url(r'^(?P&lt;slug&gt;.+)$', views.lire_article, name='blog_lire'),
    ]
  </code></pre>
  
  <p>urls.py:</p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  from django.conf import settings
  
  urlpatterns = [
    url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    ]
  </code></pre>
  
  <p>accueil.html:</p>
  
  <pre><code>{% extends "blog/base.html" %}
  {% block title %}Accueil du blog{% endblock %}
  {% block content %}
    &lt;h1&gt;Derniers articles&lt;/h1&gt;
  
    {% for article in articles %}
      &lt;h2 class="titre-article"&gt;{{ article.titre }}&lt;/h2&gt;
  
      &lt;p class="infos-article"&gt;Le {{ article.date|date:'SHORT_DATETIME_FORMAT' }}, XX commentaires.&lt;/p&gt;
  
      &lt;div class="contenu-article"&gt;
          {{ article.contenu|safe|truncatewords_html:30 }}
      &lt;/div&gt;
  
      &lt;p&gt;&lt;a href="{% url 'blog_lire' article.slug %}"&gt;Lire la suite&lt;/a&gt;&lt;/p&gt;
  
      &lt;hr /&gt;
    {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p>base.html:</p>
  
  <pre><code>{% extends "blog/base.html" %}
  
  {% block title %}{{ article.titre }}{% endblock %}
  
  {% block content %}
  
    &lt;p&gt;
        &lt;a href="{% url 'accueil' %}"&gt;Retour à la liste des articles&lt;/a&gt;
    &lt;/p&gt;
  
    &lt;h2 class="titre-article"&gt;{{ article.titre }}&lt;/h2&gt;
    &lt;p class="infos-article"&gt;Par {{ article.auteur }}, le {{ article.date }}&lt;/p&gt;
  
    &lt;div class="contenu-article"&gt;
      {{ article.contenu|safe }}
    &lt;/div&gt;
  
    &lt;h3 class="titre-comments"&gt;Commentaires&lt;/h3&gt;
  
    &lt;h4&gt;Poster votre propre commentaire&lt;/h4&gt;
    &lt;form method="post" action="" class="pure-form"&gt;
  
       &lt;!-- A vous de remplir le formulaire également --&gt;
  
       &lt;p style="text-align:center"&gt;
           &lt;input class="pure-button pure-button-primary" type="submit" /&gt;
       &lt;/p&gt;
     &lt;/form&gt;
  
     &lt;div class="clear"&gt;&lt;/div&gt;
  
  
     &lt;div class="commentaire"&gt;
       &lt;p&gt;Maxime, le 28 mai 2019&lt;/p&gt;
       &lt;p&gt;Ceci est un exemple de commentaire, qui est à remplacer par votre modèle&lt;/p&gt;
     &lt;/div&gt;
   {% endblock %}
  </code></pre>