Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Lysquid committed Dec 10, 2023
1 parent cdd73c3 commit eeba90e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion asso/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def lookups(self, request, model_admin):
return [("yes", "Oui")]

def queryset(self, request, queryset: models.LoanQuerySet):
if self.value():
if self.value() == "yes":
return queryset.late_loans()
else:
return queryset
Expand Down
2 changes: 1 addition & 1 deletion asso/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Loan(models.Model):
@property
def late_return(self):
return self.loan_start + Loan.MAX_LOAN_LENGTH
late_return.fget.short_description = "date de retour maximum"
late_return.fget.short_description = "date limite de retour"

@property
def returned(self):
Expand Down
10 changes: 5 additions & 5 deletions asso/templates/asso/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ <h3 class="mb-3">Les séries les plus empruntées</h3>
<h3 class="mb-3">Les chiffres du Club</h3>
<p>L'inventaire n'étant pas terminé, ces statistiques sont sous-estimées</p>
<ul class="list-group">
<li class="list-group-item"><b>{{ books.count }}</b> livres</li>
<li class="list-group-item"><b>{{ books.count }}</b> livre{{ books|pluralize }}</li>
{% for type, books_by_type in types.items %}
{% if books_by_type.exists %}
<li class="list-group-item"><b>{{ books_by_type.count }}</b> {{ type }}{{ books_by_type|pluralize }}</li>
{% endif %}
{% endfor %}
<li class="list-group-item"><b>{{ series.count }}</b> séries</li>
<li class="list-group-item"><b>{{ authors.count }}</b> auteurs</li>
<li class="list-group-item"><b>{{ members.count }}</b> membres cette année</li>
<li class="list-group-item"><b>{{ loans.count }}</b> emprunts par les membres actuels</li>
<li class="list-group-item"><b>{{ series.count }}</b> série{{ series|pluralize }}</li>
<li class="list-group-item"><b>{{ authors.count }}</b> auteur{{ authors|pluralize }}</li>
<li class="list-group-item"><b>{{ members.count }}</b> membre{{ members|pluralize }} cette année</li>
<li class="list-group-item"><b>{{ loans.count }}</b> emprunt{{ loans|pluralize }} par les membres actuels</li>
</ul>
</div>

Expand Down
4 changes: 2 additions & 2 deletions asso/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ def get_context_data(self, **kwargs):
nb_loans=Count('book__loan')
).filter(nb_loans__gt=0).order_by('-nb_members', '-nb_loans')[:10]

context["books"] = Book.objects
context["books"] = Book.objects.all()
context["types"] = {}
for book_type, type_name in Series.TYPES:
context["types"][type_name] = Book.objects.filter(series__type=book_type)
context["authors"] = Author.objects.filter(series__isnull=False).distinct()
context["series"] = Series.objects
context["series"] = Series.objects.all()
context["members"] = Member.objects.filter(has_paid=True)
context["loans"] = Loan.objects.filter(member__has_paid=True)

Expand Down
2 changes: 1 addition & 1 deletion inventory/templates/inventory/series_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2 class="mb-4">{{ series.name }}</h2>
<div>{{ series.authors.all|join:", " }}</div>
</div>
<div>
<div class="text-body-secondary">Éditeur{{ series.editors.all|pluralize }}</div>
<div class="text-body-secondary">Éditeur{{ series.editor.all|pluralize }}</div>
<div>{{ series.editors.all|join:", " }}</div>
</div>
<div>
Expand Down

0 comments on commit eeba90e

Please sign in to comment.