diff --git a/cotisations/templates/cotisations/aff_cotisations.html b/cotisations/templates/cotisations/aff_cotisations.html index dfee06e8..944c90fc 100644 --- a/cotisations/templates/cotisations/aff_cotisations.html +++ b/cotisations/templates/cotisations/aff_cotisations.html @@ -1,17 +1,6 @@ - {% if facture_list.paginator %} - - {% endif %} +{% if facture_list.paginator %} +{% include "pagination.html" with list=facture_list %} +{% endif %} diff --git a/machines/models.py b/machines/models.py index 509fb2cb..5fdc9758 100644 --- a/machines/models.py +++ b/machines/models.py @@ -66,4 +66,4 @@ def interface_post_save(sender, **kwargs): @receiver(post_delete, sender=Interface) def interface_post_delete(sender, **kwargs): user = kwargs['instance'].machine.user - user.ldap_sync(base=False, access_refresh=False, mac_refresh=True) + #user.ldap_sync(base=False, access_refresh=False, mac_refresh=True) diff --git a/machines/serializers.py b/machines/serializers.py index 375c4113..7b058d95 100644 --- a/machines/serializers.py +++ b/machines/serializers.py @@ -4,7 +4,7 @@ from machines.models import Interface class InterfaceSerializer( serializers.ModelSerializer): class Meta: model = Interface - fields = ('ipv4', 'mac_address', 'dns') + fields = ('ipv4', 'mac_address', 'dns', 'type') diff --git a/machines/templates/machines/aff_machines.html b/machines/templates/machines/aff_machines.html index 54be85e8..225c76ed 100644 --- a/machines/templates/machines/aff_machines.html +++ b/machines/templates/machines/aff_machines.html @@ -1,17 +1,6 @@ - {% if machines_list.paginator %} - - {% endif %} +{% if machines_list.paginator %} +{% include "pagination.html" with list=machines_list %} +{% endif %}
diff --git a/machines/urls.py b/machines/urls.py index 6327d2cc..5f1280f2 100644 --- a/machines/urls.py +++ b/machines/urls.py @@ -22,5 +22,5 @@ urlpatterns = [ url(r'^history/(?Pextension)/(?P[0-9]+)$', views.history, name='history'), url(r'^$', views.index, name='index'), url(r'^rest/mac-ip/$', views.mac_ip, name='mac-ip'), - url(r'^rest/dns-ip/$', views.dns_ip, name='dns-ip'), + url(r'^rest/mac-ip-dns/$', views.mac_ip_dns, name='mac-ip-dns'), ] diff --git a/machines/views.py b/machines/views.py index 5843a88f..1eacebfe 100644 --- a/machines/views.py +++ b/machines/views.py @@ -415,8 +415,7 @@ def mac_ip(request): s.pop('dns') return JSONResponse(seria) -def dns_ip(request): +def mac_ip_dns(request): seria = interface_list(request) - for s in seria: - s.pop('mac_address') return JSONResponse(seria) + diff --git a/templates/pagination.html b/templates/pagination.html new file mode 100644 index 00000000..f69799a9 --- /dev/null +++ b/templates/pagination.html @@ -0,0 +1,17 @@ + + diff --git a/users/templates/users/aff_users.html b/users/templates/users/aff_users.html index e113be6d..2830b1d1 100644 --- a/users/templates/users/aff_users.html +++ b/users/templates/users/aff_users.html @@ -1,17 +1,6 @@ - {% if users_list.paginator %} - - {% endif %} +{% if users_list.paginator %} +{% include "pagination.html" with list=users_list %} +{% endif %}