Generation of slugs and new urls to handle slugs
- TODO: redirect to correct slug if not found.
This commit is contained in:
parent
0751a56474
commit
ebf463fc91
22 changed files with 71 additions and 29 deletions
|
@ -267,7 +267,7 @@
|
|||
{% if user_statuses.review_count or user_statuses.comment_count or user_statuses.quotation_count %}
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{% url 'book' book.id as tab_url %}
|
||||
{% url 'book' book.id book.name|slugify as tab_url %}
|
||||
<li {% if tab_url == request.path %}class="is-active"{% endif %}>
|
||||
<a href="{{ tab_url }}#reviews">{% trans "Reviews" %} ({{ review_count }})</a>
|
||||
</li>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="{% url 'book' book.id %}">{{ book|book_title }}</a></li>
|
||||
<li><a href="{% url 'book' book.id book.name|slugify %}">{{ book|book_title }}</a></li>
|
||||
<li class="is-active">
|
||||
<a href="#" aria-current="page">
|
||||
{% trans "Edit links" %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue