• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zestedesavoir / zds-site / 5394408092

pending completion
5394408092

push

github

web-flow
Améliore l'interface d'administration pour les labels (#6513)

* Ajoute l'auto-complétion du champ pour le slug à partir du nom du
  label
* Ajoute un lien pour accéder à la page listant les contenus ayant tel
  label

4676 of 5847 branches covered (79.97%)

3 of 4 new or added lines in 2 files covered. (75.0%)

15556 of 17598 relevant lines covered (88.4%)

1.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/zds/tutorialv2/models/labels.py
1
from django.db import models
3✔
2
from django.urls import reverse
3✔
3

4

5
class Label(models.Model):
3✔
6
    """
7
    This model represents the labels used to highlight the quality of publications.
8
    Here few example of labels: "well-written", "comprehensive", "well-researched", etc.
9
    """
10

11
    class Meta:
3✔
12
        verbose_name = "Label"
3✔
13
        verbose_name_plural = "Labels"
3✔
14

15
    name = models.CharField("Nom", max_length=80, help_text="Nom du label")
3✔
16
    description = models.TextField("Description", blank=True, help_text="Description du label")
3✔
17
    slug = models.SlugField(
3✔
18
        max_length=80,
19
        unique=True,
20
        help_text="L'URL pour voir les contenus associés au label est de la forme contenus/labels/slug",
21
    )
22

23
    def __str__(self):
3✔
24
        return self.name
1✔
25

26
    def get_absolute_url(self):
3✔
NEW
27
        return reverse("content:view-labels", args=[self.slug])
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc