diff --git a/src/practice/urls.py b/src/practice/urls.py index 3288051..e37a92f 100644 --- a/src/practice/urls.py +++ b/src/practice/urls.py @@ -4,7 +4,7 @@ from store.views import books, book urlpatterns = [ - path('', books), - path('/', book), + path('', books, name='index'), + path('/', book, name='book'), path('admin/', admin.site.urls), ] diff --git a/src/store/templates/store/base.html b/src/store/templates/store/base.html index 53058fb..980090e 100644 --- a/src/store/templates/store/base.html +++ b/src/store/templates/store/base.html @@ -6,7 +6,8 @@ {% endblock %} + Accueil {% block content %} {% endblock %} - \ No newline at end of file + diff --git a/src/store/templates/store/index.html b/src/store/templates/store/index.html index 97efdea..7d1410a 100644 --- a/src/store/templates/store/index.html +++ b/src/store/templates/store/index.html @@ -6,6 +6,6 @@ {% block content %} {% for book in books %} -

{{ book.title }}

+

{{ book.title }}

{% endfor %} -{% endblock %} \ No newline at end of file +{% endblock %}