mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Fix login next + display ap
This commit is contained in:
parent
f5638ca425
commit
cbc2a63c2a
4 changed files with 8 additions and 2 deletions
|
@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% block title %}{% trans "Log in" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" action="{% url 'login' %}">
|
||||
<form method="post" action="{% url 'login' %}?next={{ next }}">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
<button class="btn btn-success" type="submit">
|
||||
|
|
|
@ -468,6 +468,10 @@ class Building(AclMixin, RevMixin, models.Model):
|
|||
verbose_name = _("building")
|
||||
verbose_name_plural = _("buildings")
|
||||
|
||||
def all_ap_in(self):
|
||||
"""Returns all ap of the building"""
|
||||
return AccessPoint.all_ap_in(self)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
|
|
@ -35,12 +35,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<tr>
|
||||
{% trans "Building" as tr_building %}
|
||||
<th>{% include "buttons/sort.html" with prefix='building' col='name' text=tr_building %}</th>
|
||||
<th>Wireless AP</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for building in building_list %}
|
||||
<tr>
|
||||
<td>{{ building.name }}</td>
|
||||
<td>{% for ap in building.all_ap_in %} {{ ap.short_name }} {% endfor %}</td>
|
||||
<td class="text-right">
|
||||
{% can_edit building %}
|
||||
<a class="btn btn-primary btn-sm" role="button" title={% trans "Edit" %} href="{% url 'topologie:edit-building' building.id %}">
|
||||
|
|
|
@ -230,7 +230,7 @@ def index_ap(request):
|
|||
queryset=(Interface.objects
|
||||
.select_related('ipv4__ip_type__extension')
|
||||
.select_related('domain__extension'))
|
||||
)))
|
||||
)).distinct())
|
||||
ap_list = SortTable.sort(
|
||||
ap_list,
|
||||
request.GET.get('col'),
|
||||
|
|
Loading…
Reference in a new issue