mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-21 03:34:25 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a6ed5462f | ||
|
|
d914fa0658 |
@@ -62,7 +62,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
form {
|
form {
|
||||||
margin: 0;
|
margin-top: .5rem;
|
||||||
|
margin-bottom: .5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
>
|
>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="margin-bottom">
|
{{ form.as_p() }}
|
||||||
{{ form.as_p() }}
|
<input type="submit" value="{% trans %}Go{% endtrans %}"/>
|
||||||
</div>
|
|
||||||
<input type="submit" class="btn btn-blue" value="{% trans %}Go{% endtrans %}"/>
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% if page_obj.has_other_pages() %}
|
{% if page_obj.has_other_pages() %}
|
||||||
{{ paginate_htmx(request, page_obj, paginator) }}
|
{{ paginate_htmx(page_obj, paginator) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr>
|
<hr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -58,13 +58,3 @@ class TestMatmatronch(TestCase):
|
|||||||
assert list(response.context_data["object_list"]) == []
|
assert list(response.context_data["object_list"]) == []
|
||||||
assert not response.context_data["form"].is_valid()
|
assert not response.context_data["form"].is_valid()
|
||||||
assert "Recherche vide" in response.context_data["form"].non_field_errors()
|
assert "Recherche vide" in response.context_data["form"].non_field_errors()
|
||||||
|
|
||||||
def test_search_many_users(self):
|
|
||||||
"""Test that the pagination works when a lot of users are returned."""
|
|
||||||
|
|
||||||
baker.make(User, promo=17, _quantity=40, _bulk_create=True)
|
|
||||||
self.client.force_login(subscriber_user.make())
|
|
||||||
response = self.client.get(reverse("matmat:search", query={"promo": 17}))
|
|
||||||
assert response.status_code == 200
|
|
||||||
assert response.context_data["paginator"].count == 43
|
|
||||||
assert response.context_data["paginator"].num_pages == 3
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from django.db.models import F
|
from django.db.models import F
|
||||||
from django.views.generic import ListView
|
from django.views.generic import ListView
|
||||||
from django.views.generic.edit import FormMixin
|
from django.views.generic.edit import FormMixin
|
||||||
|
|||||||
Reference in New Issue
Block a user