mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Bug fixing for consists
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2" scope="row">Consist data</th>
|
||||
<th colspan="2" scope="row">Consist</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<ul class="pagination justify-content-center mt-4 mb-0">
|
||||
{% if data.has_previous %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{% url 'scales_pagination' page=data.previous_page_number %}#main-content" tabindex="-1">Previous</a>
|
||||
<a class="page-link" href="{% url 'types_pagination' page=data.previous_page_number %}#main-content" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
@@ -21,13 +21,13 @@
|
||||
{% if i == data.paginator.ELLIPSIS %}
|
||||
<li class="page-item"><span class="page-link">{{ i }}</span></li>
|
||||
{% else %}
|
||||
<li class="page-item"><a class="page-link" href="{% url 'scales_pagination' page=i %}#main-content">{{ i }}</a></li>
|
||||
<li class="page-item"><a class="page-link" href="{% url 'types_pagination' page=i %}#main-content">{{ i }}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if data.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{% url 'scales_pagination' page=data.next_page_number %}#main-content" tabindex="-1">Next</a>
|
||||
<a class="page-link" href="{% url 'types_pagination' page=data.next_page_number %}#main-content" tabindex="-1">Next</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
|
@@ -26,9 +26,15 @@ urlpatterns = [
|
||||
GetFlatpage.as_view(),
|
||||
name="flatpage",
|
||||
),
|
||||
path("consists", Consists.as_view(), name="consists"),
|
||||
path(
|
||||
"consists/<int:page>", Consists.as_view(), name="consists_pagination"
|
||||
"consists",
|
||||
Consists.as_view(template="consists.html"),
|
||||
name="consists"
|
||||
),
|
||||
path(
|
||||
"consists/<int:page>",
|
||||
Consists.as_view(template="consists.html"),
|
||||
name="consists_pagination"
|
||||
),
|
||||
path("consist/<uuid:uuid>", GetConsist.as_view(), name="consist"),
|
||||
path(
|
||||
|
@@ -347,10 +347,9 @@ class GetRollingStock(View):
|
||||
|
||||
|
||||
class Consists(GetData):
|
||||
def __init__(self):
|
||||
self.title = "Consists"
|
||||
self.item_type = "consist"
|
||||
self.queryset = Consist.objects.all()
|
||||
title = "Consists"
|
||||
item_type = "consist"
|
||||
queryset = Consist.objects.all()
|
||||
|
||||
|
||||
class GetConsist(View):
|
||||
|
Reference in New Issue
Block a user