Django URL pattern does not match with my config
Question: I'm new with Django, I'm having a problem with the url of the page
"`DetailLivre.html`" it shows :

Using the `URLconf` defined in `Ilhem.urls`, Django tried these URL patterns,
in this order:

    
    
    ^Bibliotheque/ ^$ [name='index']
    ^Bibliotheque/ ^(?P<livre_id>[0-9]+)/$ [name='DetailLivre']
    ^admin/
    

The current URL, `Bibliotheque/BOOK1/`, didn't match any of these.*

I'm using: `Python 2.7.6`, `django 1.8.5` can you please help?

**index.html:**

    
    
    <h1>La liste des Livres </h1>
     
    {% block content %}
        {% block theme %}
        {% load bootstrap_themes %}
        {% bootstrap_styles theme='default' type='min.css' %}
        {% bootstrap_styles theme='cosmo' type='css' %}
        {% bootstrap_styles theme='united' type='less' %}
        {% bootstrap_script use_min=True %}
        {% endblock theme %}
    {% if BookList%}
    <div class="container-fluid">
        <div class="row">
        <ul>
        {% for livre in BookList %}
            <li><a href="/Bibliotheque/{{ livre.Titre }}/">{{ livre.Titre }}</a></li>
        {% endfor %}
        </ul>
        </div>
    </div>
    {% else %}
        <p>Pas de Livres.</p>
    {% endif %}
    {% endblock %}

**DetailLivre.html**

    
    
    <h1>{{ Auteur }}</h1>
    
     <label for="Nom">{{ Auteur.Nom }}</label><br />
     <label for="Prenom">{{ Auteur.Prenom }}</label><br />
     <label for="dateNaissance">{{ Auteur.dateNaissance }}</label><br />
     <label for="Lieu_de_naissance">{{ Auteur.Lieu_de_naissance }}</label><br />
     <label for="Specialite">{{ Auteur.Specialite }}</label>

**Views.py**

    
    
        
    from django.shortcuts import render
    from django.template import RequestContext, loader
    from django.http import HttpResponse
    from django.template import RequestContext, loader
    from django.shortcuts import get_object_or_404, render
    from .models import Livre, Auteur
    
    def index(request):
        
        BookList = Livre.objects.all()
        template = loader.get_template('Bibliotheque/index.html')
        context = RequestContext(request, {
            'BookList': BookList,
        })
        return HttpResponse(template.render(context))
    
    def DetailLivre(request, livre_id):
    livre = Livre.objects.get(pk=livre_id)
    return render(request, 'Bibliotheque/DetailLivre.html', {'livre.Titre': livre.Titre})
        

**url.py**

    
    
    from django.conf.urls import url
    
    from . import views
    
    urlpatterns = [
        url(r'^$', views.index, name='index'),
        url(r'^(?P<livre_id>[0-9]+)/$', views.DetailLivre, name='DetailLivre'),
    ]


Answer: you have missing BOOK prefix `BOOK(?P<livre_id>[-\d]+)`

