From 21c1a5719be74d9cc09003d6eb2a4ce8daaf6625 Mon Sep 17 00:00:00 2001 From: Klafyvel Date: Wed, 24 Jan 2018 11:44:54 +0100 Subject: [PATCH] =?UTF-8?q?Cat=C3=A9gories=20affich=C3=A9es=20dans=20la=20?= =?UTF-8?q?navbar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/migrations/0002_auto_20180124_1043.py | 23 +++++++++++++++++++ content/models.py | 2 +- content/urls.py | 1 + templates/nav_bar.html | 5 ++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 content/migrations/0002_auto_20180124_1043.py diff --git a/content/migrations/0002_auto_20180124_1043.py b/content/migrations/0002_auto_20180124_1043.py new file mode 100644 index 0000000..2f2e85c --- /dev/null +++ b/content/migrations/0002_auto_20180124_1043.py @@ -0,0 +1,23 @@ +# Generated by Django 2.0.1 on 2018-01-24 10:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='category', + name='Nom de la catégorie', + ), + migrations.AddField( + model_name='category', + name='name', + field=models.CharField(default='Nom de la catégorie', max_length=255, verbose_name='Nom de la catégorie'), + preserve_default=False, + ), + ] diff --git a/content/models.py b/content/models.py index 915fb3a..f1f56ef 100644 --- a/content/models.py +++ b/content/models.py @@ -6,7 +6,7 @@ class Category(models.Model): """Une catégorie de contenu.""" name = models.CharField( max_length=255, - name="Nom de la catégorie" + verbose_name="Nom de la catégorie" ) diff --git a/content/urls.py b/content/urls.py index 7d45c33..78f290c 100644 --- a/content/urls.py +++ b/content/urls.py @@ -2,6 +2,7 @@ from django.urls import path from .views import ContentCategoryList +app_name = 'content' urlpatterns = [ path( 'category//', diff --git a/templates/nav_bar.html b/templates/nav_bar.html index 8a52b38..c426d25 100644 --- a/templates/nav_bar.html +++ b/templates/nav_bar.html @@ -1,3 +1,5 @@ +{% load categories %} +{% load_categories %}