add parenthesis and spaces and access restriction to connection list
This commit is contained in:
parent
b6f93e7bb0
commit
536f63eab7
2 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,7 @@
|
|||
→
|
||||
{% for connection in connections %}
|
||||
{% if connection.from_node_id == active_node.pk %}
|
||||
{{ connection.other_node.pk }}{% if connection.waytype %}{{ connection.waytype.title }}{% endif %},
|
||||
{{ connection.other_node.pk }}{% if connection.waytype %} ({{ connection.waytype.title }}){% endif %}{% if connection.access_restriction_id %} ({{ connection.access_restriction.title }}){% endif %},
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<br>
|
||||
|
|
|
@ -490,7 +490,8 @@ def graph_edit(request, level=None, space=None):
|
|||
if active_node:
|
||||
for self_node, other_node in (('from_node', 'to_node'), ('to_node', 'from_node')):
|
||||
conn_qs = GraphEdge.objects.filter(Q(**{self_node+'__pk': active_node.pk}))
|
||||
conn_qs = conn_qs.select_related(other_node+'__space', other_node+'__space__level', 'waytype')
|
||||
conn_qs = conn_qs.select_related(other_node+'__space', other_node+'__space__level',
|
||||
'waytype', 'access_restriction')
|
||||
|
||||
for edge in conn_qs:
|
||||
edge.other_node = getattr(edge, other_node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue